ELCT 302 / Mbed 2 deprecated Sandbox

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
KDrainEE
Date:
Sun Apr 22 13:31:48 2018 +0000
Parent:
0:8bf709d3440b
Commit message:
moved controller(testing branches)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Apr 18 14:58:02 2018 +0000
+++ b/main.cpp	Sun Apr 22 13:31:48 2018 +0000
@@ -213,6 +213,10 @@
     data[4] = gateDrive.read();
     data[5] = speed.read();    
 }
+void cb()
+{
+controller();
+}
 
 int main()
 {   
@@ -224,7 +228,7 @@
     gateDrive.write(Setpoint);
 
     ctrlTimer.start();
-    control.attach(&controller, TI);
+    control.attach(&cb, TI);
     
     rightCount = 0;
     leftCount = 0;