Project

General

Profile

Statistics
| Revision:

root / branches / battery / code / projects / template / main.c @ 274

History | View | Annotate | Download (655 Bytes)

1
#include <dragonfly_lib.h>
2
#include <battery.h>
3

    
4
int counter = 0;
5

    
6
int main(void) {
7
        dragonfly_init(ALL_ON);
8
        motors_init();
9
        usb_init();
10
        analog_init();
11

    
12
        while(1) {
13
                
14
                //Drain battery as fast as possible
15
                motor1_set(1, 255);
16
                motor2_set(1, 255);
17
                
18
                bom_on();
19
                
20
                //Prints out the results of three functions
21
/*                usb_puts("battery8_avg\(50\): ");
22
                usb_puti(battery8_avg(50));
23
                
24
                usb_puts("\t\t");
25
                
26
                usb_puts("battery8\(\): ");
27
*/                usb_puti(battery8());
28
                
29
/*                usb_puts("\t\t");
30
                
31
                usb_puts("battery\(\): ");
32
                usb_puti(battery());
33
                
34
*/                usb_puts("\r\n");
35
                
36
                delay_ms(100);
37
                
38
        }
39
        
40
        return 0;
41
}
42