Project

General

Profile

Statistics
| Revision:

root / trunk / code / behaviors / formation_control / push_pull / push_pull.c @ 1622

History | View | Annotate | Download (494 Bytes)

1 1510 jsexton
#include <stdint.h>
2 1156 deffi
#include <dragonfly_lib.h>
3 1502 jsexton
#include <wl_basic.h>
4 1510 jsexton
#include <stdlib.h>
5 1156 deffi
6 1502 jsexton
int main (void) {
7 1156 deffi
8 1542 jsexton
        Vector v;
9 1156 deffi
10 1502 jsexton
        dragonfly_init(ALL_ON);
11
        xbee_init();
12
        encoders_init();
13 1156 deffi
14 1502 jsexton
        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 1156 deffi
20 1502 jsexton
        while (1) {
21 1530 jsexton
                bom_print_usb(NULL);
22
23 1542 jsexton
                bom_get_vector(&v, NULL);
24 1156 deffi
25 1542 jsexton
                usb_puts("x: ");
26
                usb_puti(v.x);
27 1502 jsexton
                usb_puts("\ty: ");
28 1542 jsexton
                usb_puti(v.y);
29 1503 jsexton
                usb_puts("\n");
30 1156 deffi
31 1508 jsexton
                delay_ms(50);
32 1502 jsexton
        }
33 1156 deffi
34 1502 jsexton
        while(1);
35 1156 deffi
36
}