Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / bom_tracker / bom_tracker.c @ 1542

History | View | Annotate | Download (564 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
        int i;
10
        int bomVals[16];
11

    
12
        dragonfly_init(ALL_ON);
13
        xbee_init();
14
        encoders_init();
15

    
16
        orbs_set_color(BLUE, GREEN);
17
        delay_ms(1000);
18
        orbs_set_color(GREEN, BLUE);
19
        delay_ms(1000);
20
        orbs_set_color(RED, RED);
21

    
22
        while (1) {
23

    
24
                bom_refresh(BOM_ALL);
25
                for (i = 0; i < 16; i++) {
26
                        bomVals[i] = bom_get(i);
27
                }
28

    
29
                bom_get_vector(&v, bomVals);
30

    
31
                usb_puti(v.x);
32
                usb_puts(",");
33
                usb_puti(v.y);
34
                usb_puts("\n");
35

    
36
                delay_ms(50);
37

    
38
        }
39

    
40
        while(1);
41

    
42
}