Dependencies:   mbed Servo

Files at this revision

API Documentation at this revision

Comitter:
Debci
Date:
Tue Feb 22 19:44:49 2011 +0000
Parent:
0:6e0c27d0cb91
Commit message:
Rev2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Feb 20 15:29:40 2011 +0000
+++ b/main.cpp	Tue Feb 22 19:44:49 2011 +0000
@@ -5,18 +5,20 @@
 Servo motor(p21);
 
 int main() {
+  
   armarESC();
+  wait_ms(10000);
   for(int i = 0; i < 50000; i++) {
-    motor = convertidorBases(70);    
+    motor = 50.0;    
   }
   
 }
 //Función para armar el ESC
 void armarESC() {
+  wait_ms(10000);
   motor = 0.0;
-  wait_ms(500);
-  motor = convertidorBases(30);
-  wait_ms(10000); 
+  wait_ms(10000);
+  motor = 11.56; 
 }
 //Función para convertir un valor de pulso de base 255 a base 1.0 (porcentage)
 float convertidorBases(int base255) {