Oskar Weigl
/
Quadcopterv2
This is for ICRS\' second generation Quadcopter
Diff: main_init.h
- Revision:
- 0:0bbf2f16da9c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main_init.h Fri Nov 18 18:23:33 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