statemachine

Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Files at this revision

API Documentation at this revision

Comitter:
boydmartherus
Date:
Mon Sep 23 07:54:49 2019 +0000
Parent:
12:597f6b8224e5
Child:
15:49f750d895d7
Commit message:
23/9 motor + flip + hoek

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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());
                 }