Project

General

Profile

Statistics
| Revision:

root / branches / autonomous_recharging / code / projects / libwireless / bayboardTest / main.c @ 726

History | View | Annotate | Download (711 Bytes)

1
#include <bayboard_lib.h>
2
#include <wireless.h>
3
#include <wl_token_ring.h>
4
#include <xbee.h>
5
#include <ctype.h>
6

    
7
void test_bom_on (void)
8
{
9
        set_orb(0,200,0);
10
        delay_ms(50);
11
}
12

    
13
void test_bom_off(void)
14
{
15
        set_orb(200,0,200);
16
        delay_ms(50);
17
}
18

    
19
int test_nothing(void)
20
{
21
        return -1;
22
}
23

    
24
void do_nothing (void) {
25
        
26
}
27

    
28
int main(void)
29
{
30
        bayboard_init(ALL_ON);
31
        //xbee_lib_init();
32
        
33
        set_orb(200,0,0);
34
        
35
        wl_init();
36
        if(wl_token_ring_register() < 0) {
37
          set_orb(200,0,0);
38
          return -1;
39
        }
40
        if(wl_token_ring_join() < 0) {
41
          set_orb(200,0,0);
42
          return -1;
43
        }
44
        
45
        set_orb(0,200,0);
46
        usb_puts("== start ==\n");
47
        delay_ms(200);
48
        
49
        //bom_init(0);
50

    
51
  //int c;
52
  //char buf[20];
53
        while (1) {
54
          wl_do();
55
        }
56
        
57
        return 0;
58
        
59
}
60

    
61