statemachine

Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Revision:
14:4342436f9f4f
Parent:
12:597f6b8224e5
Child:
15:49f750d895d7
--- a/main.cpp	Fri Sep 20 13:02:15 2019 +0000
+++ b/main.cpp	Mon Sep 23 07:54:49 2019 +0000
@@ -31,17 +31,17 @@
         {
             if (pin == 1)
                 {
+                printf("now forward");
                 led.write(pot);
-                wait(0.1);
                 motor.write(pot);
                 //printf("motor speeed is (%f)\n\r",pot.read());
                 //printf("pulse number is (%i)\n\r",wheel.getPulses());
                 }
             else
                 {
+                printf("now reversing");
                 led.write(1-pot);
-                wait(0.1);
-                motor.write(-pot);
+                motor.write(pot);
                 //printf("motor speeed is (%f)\n\r",pot.read());
                 //printf("pulse number is (%i)\n\r",wheel.getPulses());
                 }