![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Very early flyable code.
Diff: main_init.h
- Revision:
- 0:9fcb3bf5c231
diff -r 000000000000 -r 9fcb3bf5c231 main_init.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main_init.h Sat Oct 01 12:57:23 2011 +0000 @@ -0,0 +1,36 @@ + + +void main_init() { + + //Emergency stop button + Nkill.mode(PullDown); + + pc.printf("Hello World!\r\n"); + + initmotor(); + + /* + //Init motor pwm + left.period_ms(20); + left = 0.01; + right.period_ms(20); + right = 0.01; + + front.period_ms(20); + front = 0.01; + rear.period_ms(20); + rear = 0.01; + */ + + pc.printf("Motors initialized\r\n"); + + //Setup accelerometer + //setupaccel(); + //pc.printf("Accelorometer initialized\r\n"); + + //Setup gyros, and calibrate them + wait(0.5); + calibgyro(); + pc.printf("Gyros initialized and calibrated\r\n"); + +} \ No newline at end of file