root / trunk / code / behaviors / formation_control / push_pull / push_pull.c @ 1542
History | View | Annotate | Download (494 Bytes)
1 |
#include <stdint.h> |
---|---|
2 |
#include <dragonfly_lib.h> |
3 |
#include <wl_basic.h> |
4 |
#include <stdlib.h> |
5 |
|
6 |
int main (void) { |
7 |
|
8 |
Vector v; |
9 |
|
10 |
dragonfly_init(ALL_ON); |
11 |
xbee_init(); |
12 |
encoders_init(); |
13 |
|
14 |
orbs_set_color(BLUE, GREEN); |
15 |
delay_ms(1000);
|
16 |
orbs_set_color(GREEN, BLUE); |
17 |
delay_ms(1000);
|
18 |
orbs_set_color(RED, RED); |
19 |
|
20 |
while (1) { |
21 |
bom_print_usb(NULL);
|
22 |
|
23 |
bom_get_vector(&v, NULL);
|
24 |
|
25 |
usb_puts("x: ");
|
26 |
usb_puti(v.x); |
27 |
usb_puts("\ty: ");
|
28 |
usb_puti(v.y); |
29 |
usb_puts("\n");
|
30 |
|
31 |
delay_ms(50);
|
32 |
} |
33 |
|
34 |
while(1); |
35 |
|
36 |
} |