root / trunk / code / projects / colonet / utilities / robot_slave / robot_slave.c @ 423
History | View | Annotate | Download (593 Bytes)
1 |
/**
|
---|---|
2 |
* Eugene Marinelli
|
3 |
* 4/5/07
|
4 |
*
|
5 |
* Robot slave program -- just listens for packets
|
6 |
*/
|
7 |
|
8 |
#include <dragonfly_lib.h> |
9 |
#include <colonet_dragonfly.h> |
10 |
#include <wireless.h> |
11 |
#include <wl_token_ring.h> |
12 |
#include <serial.h> |
13 |
#include <stdio.h> |
14 |
|
15 |
int main(void) { |
16 |
dragonfly_init(ALL_ON); |
17 |
|
18 |
orb_set_color(RED); |
19 |
usb_puts("calling wl_init\n");
|
20 |
|
21 |
wl_init(); |
22 |
colonet_init(); |
23 |
|
24 |
wl_token_ring_register(); |
25 |
|
26 |
if (wl_token_ring_join() == 0) { |
27 |
orb_set_color(GREEN); |
28 |
//usb_puts("test!\n");
|
29 |
|
30 |
while(1) { |
31 |
wl_do(); |
32 |
} |
33 |
} else {
|
34 |
orb_set_color(RED); |
35 |
} |
36 |
|
37 |
while(1); |
38 |
|
39 |
return 0; |
40 |
} |