Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Revision:
5:72982ede2ff6
Parent:
4:2cc56521aa16
Child:
6:8ed679044a72
--- a/main.cpp	Tue Apr 10 11:44:36 2018 +0000
+++ b/main.cpp	Tue Apr 17 09:06:47 2018 +0000
@@ -44,12 +44,13 @@
 AnalogOut out(PA_5);                    // Analog OUT on PA_5   1.6 V -> 0A 3.2A -> 2A (see ESCON)
 float out_value = 1.6f;                 // set voltage on 1.6 V (0 A current)
 float w_soll = 10.0f;                   // desired velocity
-float Ts = 0.002f;                      // sample time of main loops
+float Ts = 0.2f;                      // sample time of main loops
 int k = 0;
 
 //------------------------------------------
 // ... here define variables like gains etc.
 //------------------------------------------
+LinearCharacteristics i2u(1.5f,2.5f);
 
 //------------------------------------------
 Ticker  ControllerLoopTimer;            // interrupt for control loop
@@ -85,10 +86,10 @@
     short counts = counter1;            // get counts from Encoder
     float vel = diff(counts);           // motor velocity 
      // ... your code 
-    if(++k >= 249){
-        k = 0;
-        pc.printf("Pulse: %d Velocity: %3.2f\r\n",counts,vel);
-    }
+  //  if(++k >= 249){
+  //      k = 0;
+        pc.printf("i2u(8): %3.3f\r\n",i2u(8.0f));
+    //}
 }
 //******************************************************************************
 //********** User functions like buttens handle etc. **************