Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (414 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
                usb_puts("port ");
20
                usb_puts(itoa(WHEEL_PORT, buf, 10));
21
                usb_puts("\tvalue: ");
22
                usb_puts(itoa(analog_get8(WHEEL_PORT), buf, 10));
23
                usb_puts("\n");
24
                delay_ms(100);
25
        }
26
}