root / trunk / code / behaviors / bfs_fsm / test_decoy / decoy.c @ 740
History | View | Annotate | Download (601 Bytes)
1 |
/** driver for orbit code
|
---|---|
2 |
sit and activate bom, let other robot orbit this
|
3 |
*/
|
4 |
|
5 |
#include <dragonfly_lib.h> |
6 |
#include <wireless.h> |
7 |
#include <wl_token_ring.h> |
8 |
|
9 |
|
10 |
|
11 |
int main(void) { |
12 |
// enable everything
|
13 |
dragonfly_init(ALL_ON); |
14 |
orb_enable(); |
15 |
orb_init(); |
16 |
orb_set_color(PURPLE); |
17 |
wl_init(); |
18 |
wl_set_channel(0xF);
|
19 |
wl_token_ring_register(); |
20 |
wl_token_ring_join(); // join token ring
|
21 |
usb_init(); |
22 |
usb_puts("start");
|
23 |
usb_puti(wl_get_xbee_id()); |
24 |
|
25 |
|
26 |
while(1) { |
27 |
wl_do(); /* do wireless */
|
28 |
} |
29 |
|
30 |
orb_set_color(RED); |
31 |
usb_puts("end");
|
32 |
|
33 |
return 0; |
34 |
} |