Pedro Enrique Vidal Peñas
/
quadcopter
Gestion de imu y arranque de motores cuadcopter primera fase
Diff: main.cpp
- Revision:
- 0:ce49c05e9d73
diff -r 000000000000 -r ce49c05e9d73 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Feb 22 22:08:30 2011 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" +#include "Servo.h" +#include "main.h" +#include "9dof.h" + +Servo motor(p21); + +Serial pc(USBTX, USBRX); +dof9RazorImu Razor(p9, p10); + +int main() { + + + + armarESC(); + wait_ms(10000); + for (int i = 0; i < 50000; i++) { + motor = 50.0; + + Razor.update(); + pc.printf("%d\r\n", Razor.getGyroZ()); + wait(0.5); + + } + +} +//Función para armar el ESC +void armarESC() { + wait_ms(10000); + motor = 0.0; + wait_ms(10000); + motor = 11.56; +} \ No newline at end of file