root / trunk / code / projects / rangefinders / IR2 / testIR2.c @ 1455
History | View | Annotate | Download (413 Bytes)
| 1 | #include <dragonfly_lib.h> |
|---|---|
| 2 | |
| 3 | int main(void) |
| 4 | {
|
| 5 | /* initialize components, set wireless channel */
|
| 6 | dragonfly_init(ALL_ON); |
| 7 | |
| 8 | //Replace the next two lines with your own code
|
| 9 | //You can add as many lines as you want
|
| 10 | |
| 11 | while(1) { |
| 12 | usb_puti(range_read_distance(IR2)); |
| 13 | usb_putc('\r');
|
| 14 | delay_ms(50);
|
| 15 | } |
| 16 | |
| 17 | //this tell the robot to just chill out forever. don't put anything after this
|
| 18 | while(1); |
| 19 | return 0; |
| 20 | } |