Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (510 Bytes)

1 1059 jsexton
#include <dragonfly_lib.h>
2
#include <encoders.h>
3
4
int main(void)
5
{
6 1136 jsexton
        char buf[16];
7
        int i;
8 1117 jsexton
9 1059 jsexton
        /* initialize components */
10 1110 jsexton
        sei();
11
        orb_init();
12 1117 jsexton
        usb_init();
13
        analog_init(ADC_START);
14 1059 jsexton
15 1110 jsexton
        orb_set(255, 0, 0);
16 1059 jsexton
17 1117 jsexton
        usb_puts("Yay we are on!\n");
18
19
        while(1) {
20 1133 jsexton
21 1136 jsexton
                usb_puts("port:\t\tval:\n\n");
22
23
                for (i = 0; i < 0x10; i++) {
24
25
                        usb_puts(itoa(i, buf, 10));
26
                        usb_puts("\t\t");
27
                        usb_puts(itoa(analog_get10(i), buf, 10));
28
                        usb_puts("\n");
29
30
                }
31
32 1117 jsexton
                delay_ms(100);
33
        }
34 1133 jsexton
35 1136 jsexton
        exit(1); /* Control never reaches this point */
36
37 1059 jsexton
}