Tests motors - increments one, decrements the other

Dependencies:   mbed

Fork of FRDM-K64_PWM by Augusto Panecatl

Revision:
0:24a5f9b6fd64
Child:
1:fd419b982c73
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jul 09 19:31:42 2014 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+//PWM output channel
+PwmOut PWM1(A5);
+
+int main() 
+{
+    PWM1.period_ms(500);
+    int x;
+    x=1;
+    
+    while(1)
+    {
+        PWM1.pulsewidth_ms(x);
+        x=x+1;
+        wait(.1);
+        if(x==500)
+        {
+            x=1;
+        }
+    }
+}
\ No newline at end of file