Project

General

Profile

Statistics
| Revision:

root / branches / autonomous_recharging / code / projects / autonomous_recharging / charging_station / main.c @ 213

History | View | Annotate | Download (514 Bytes)

1
#include <firefly+_lib.h>
2

    
3
#include <wireless.h>
4
#include <wl_token_ring.h>
5

    
6
#include "charging.h"
7

    
8
int main(void)
9
{
10
        analog_init();
11
        led_init();
12
        orb_init();
13
        buzzer_init();
14
        usb_init(BAUD115200);
15
        xbee_init(BAUD9600);
16
        
17
        //dragonfly_init(ALL_ON);
18

    
19
        usb_puts("Initializing wireless.\n");
20
        wl_init();
21
        wl_set_channel(0xA);
22
        usb_puts("Wireless initialized.\n");
23
        wl_token_ring_register();
24
        wl_token_ring_join();
25
        charging_init();
26

    
27
        usb_puts("Charging station initialized.\n");
28

    
29
        while (1)
30
                wl_do();
31

    
32
        return 0;
33
}
34