root / trunk / code / projects / mapping / odometry / main.c @ 963
History | View | Annotate | Download (407 Bytes)
1 |
#include <dragonfly_lib.h> |
---|---|
2 |
#include "odometry.h" |
3 |
#include <math.h> |
4 |
|
5 |
int main(void) |
6 |
{ |
7 |
dragonfly_init(ALL_ON); |
8 |
odometry_init(); |
9 |
char buf[100]; |
10 |
move(180,0); |
11 |
odometry_set_velocity(50,180,0); |
12 |
while(1){ |
13 |
sprintf(buf,"X: %ld mm, Y: %ld mm, Theta: %lf rad Velocity: %ld mm/s\n\r",
|
14 |
odometry_dx(), odometry_dy(), odometry_angle(), odometry_velocity()); |
15 |
usb_puts(buf); |
16 |
delay_ms(500);
|
17 |
} |
18 |
return 0; |
19 |
} |
20 |
|
21 |
|