Jorn Dokter / Mbed 2 deprecated TEB_branch2

Dependencies:   mbed QEI HIDScope biquadFilter MODSERIAL FastPWM

Revision:
15:95034d92bc76
Parent:
14:1a695fc45fc6
Child:
16:fa8001fef71b
--- a/main.cpp	Thu Oct 03 09:04:34 2019 +0000
+++ b/main.cpp	Thu Oct 03 13:03:38 2019 +0000
@@ -4,6 +4,11 @@
     #include "HIDScope.h"
     #include "MODSERIAL.h"
     #include "QEI.h"
+    
+//Homebrew libraries
+    #include "header.h"
+    //#include "controller.cpp"
+
 
 //Objects
     //LED
@@ -22,7 +27,7 @@
         InterruptIn button2(SW3); //button on the side opposite of the reset button
 
     //PC
-        Serial pc(USBTX,USBRX);
+        Serial pc(USBTX,USBRX);
 
 //Variables
     enum States {MovementIdle, CalibrationIdle, Demo, Startup, CalibrationPhysical, CalibrationEMG, Move, TiltCup, FailState};
@@ -41,9 +46,6 @@
     Ticker Main_Ticker;
     Ticker Tick_Blinky;//used for the blinking of the leds
 
-
-
-
 //Led FLicker
 void FlipLED(void)
 {
@@ -111,7 +113,7 @@
     }
 }
 // SW3 = button2 state changing
-void Run_StateChangerButton2()
+void Run_StateChangerButton2(void)
 {
     switch(CurrentState)
     {
@@ -255,7 +257,10 @@
         Main_Ticker.attach(mainloop,mainLoopT);
         wait(mainLoopT);
         Tick_Blinky.attach(FlipLED,ledFlipperT);
-    
+
+    double PlantError = 1;
+    double k = 1;
+    double u = ControllerPID(PlantError, k);
     
     while(true)
     {