Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / stationCode / v1 / main.c @ 1133

History | View | Annotate | Download (424 Bytes)

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

    
4
int main(void)
5
{
6
        char buf[5];
7

    
8
        /* initialize components */
9
        sei();
10
        orb_init();
11
        usb_init();
12
        analog_init(ADC_START);
13

    
14
        orb_set(255, 0, 0);
15

    
16
        usb_puts("Yay we are on!\n");
17

    
18
        while(1) {
19

    
20
                usb_puts("port:\t\tval:");
21
                usb_puts(itoa(WHEEL_PORT, buf, 10));
22
                usb_puts("\tvalue: ");
23
                usb_puts(itoa(analog_get8(WHEEL_PORT), buf, 10));
24
                usb_puts("\n");
25
                delay_ms(100);
26
        }
27

    
28
}