Ramon Waninge / Mbed 2 deprecated Milestone1

Dependencies:   FastPWM mbed QEI biquadFilter HIDScope MODSERIAL

Revision:
13:6556cd086d07
Parent:
11:3efd6a324f16
Child:
14:e21cb701ccb8
diff -r 3efd6a324f16 -r 6556cd086d07 main.cpp
--- a/main.cpp	Mon Oct 08 15:10:47 2018 +0000
+++ b/main.cpp	Fri Oct 12 12:24:24 2018 +0000
@@ -1,8 +1,9 @@
 #include "mbed.h"
 #include "FastPWM.h"    
 #include "QEI.h"        // Includes library for encoder
-
-Ticker motor;
+#include "MODSERIAL.h"
+#include "HIDScope.h"
+#include "BiQuad.h"
 
 AnalogIn pot1(A1);
 AnalogIn pot2(A2);
@@ -28,6 +29,7 @@
 DigitalOut pin7(D7);    // Motor 1 direction
 //float u1  = pot1;
 
+Ticker motor;
 float u3 = 0.0;         // Normalised variable for the movement of motor 3
 
 void draaibuttons()         
@@ -38,19 +40,19 @@
     */
     if (button1 == 1)
     {   if (button2 == 1)
-        {   u3 = u3 + 0.1;  //In stapjes van 0.1
+        {   u3 = u3 + 0.1f;  //In stapjes van 0.1
             pin3 = fabs(u3);
-            if (u3>1.0)
-            {   u3 = 1.0;
+            if (u3>1.0f)
+            {   u3 = 1.0f;
             }
         }
     }
     else if (button1 == 0)
     {   if (button2 == 1)
-        {   u3 = u3 - 0.1;
+        {   u3 = u3 - 0.1f;
             pin3 = fabs(u3);
-            if (u3>1.0)
-            {   u3 = 1.0;
+            if (u3>1.0f)
+            {   u3 = 1.0f;
             }
         }
     }