Bismarck / Mbed 2 deprecated ESC_TEST_CODE

Dependencies:   mbed

Revision:
0:40a2ad5e1ba6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 30 21:57:52 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+PwmOut mypwm(A0);
+
+DigitalOut myled(LED1);
+
+int main() {
+    
+    mypwm.period_ms(20);    //20ms period voor esc
+    mypwm.pulsewidth_us(1500); //neutraal voor cal
+    wait(3);    //give esc cal neutral some time , this is just a random value
+    mypwm.pulsewidth_us(1400); //reverse
+    wait(1);
+    mypwm.pulsewidth_us(1600); //forward
+    wait(1);
+    mypwm.pulsewidth_us(1500); //neutraal
+
+    
+// printf("pwm set to %.2f %%\n", mypwm.read() * 100);   
+//    while(1) {
+//        myled = !myled;
+//        wait(1);
+//    }
+}