4d96646283c9688199871ead702e79ea244c7b60
[wsn-p.git] / tutorial / ledtest / ledtest.c
1 #include <contiki.h>
2 #include <leds.h>
3 #include <stdio.h>
4
5 PROCESS(ledtest, "LED test");
6 AUTOSTART_PROCESSES(&ledtest);
7
8 PROCESS_THREAD(ledtest, ev, data) {
9 PROCESS_BEGIN();
10
11 leds_init();
12 leds_off(LEDS_ALL);
13
14 static struct etimer led_timer;
15 static char i;
16 for(i = 0; 1; i++) {
17 etimer_set(&led_timer, CLOCK_SECOND);
18
19 if((i % 2)) {
20 leds_toggle(LEDS_GREEN);
21 }
22 leds_toggle(LEDS_YELLOW);
23
24 PROCESS_WAIT_EVENT();
25 }
26
27 PROCESS_END();
28 }
This page took 0.037256 seconds and 3 git commands to generate.