motor controller with P velocity control

Dependencies:   HIDScope PID QEI mbed EMG

Fork of PID_VelocityExample by Aaron Berk

Revision:
17:034b50f49f46
Parent:
16:e9945e3b4712
Child:
18:4ee32b922251
diff -r e9945e3b4712 -r 034b50f49f46 inits.h
--- a/inits.h	Wed Oct 07 11:45:27 2015 +0000
+++ b/inits.h	Wed Oct 07 12:19:30 2015 +0000
@@ -38,8 +38,13 @@
 // Timers
 Ticker motorControlTicker;
 Ticker speedcalcTicker;
+Timer velocityTimer;
+float looptime;
+float lasttime=0;
+float thistime;
 bool goFlag=false;
 bool calcFlag=false;
+bool didCalc=false;
 bool systemOn=false;
 
 // Working variables: motors