root / trunk / code / projects / diagnostic_station / stationCode / v1 / main.c @ 1136
History | View | Annotate | Download (510 Bytes)
1 |
#include <dragonfly_lib.h> |
---|---|
2 |
#include <encoders.h> |
3 |
|
4 |
int main(void) |
5 |
{ |
6 |
char buf[16]; |
7 |
int i;
|
8 |
|
9 |
/* initialize components */
|
10 |
sei(); |
11 |
orb_init(); |
12 |
usb_init(); |
13 |
analog_init(ADC_START); |
14 |
|
15 |
orb_set(255, 0, 0); |
16 |
|
17 |
usb_puts("Yay we are on!\n");
|
18 |
|
19 |
while(1) { |
20 |
|
21 |
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 |
delay_ms(100);
|
33 |
} |
34 |
|
35 |
exit(1); /* Control never reaches this point */ |
36 |
|
37 |
} |