Using HIDScope for P(I)D controller

Dependencies:   FastPWM HIDScope MODSERIAL QEI biquadFilter mbed

Fork of PES_tutorial_5 by BMT Module 9 Group 4

Revision:
3:ea819bcf667f
Parent:
2:34c14fb36b5d
Child:
4:49c5fd62a192
--- a/main.cpp	Mon Oct 15 09:22:59 2018 +0000
+++ b/main.cpp	Mon Oct 15 09:24:44 2018 +0000
@@ -16,8 +16,8 @@
    
 void buttonpress()
 {
-     motor1_direction = 1 - motor1_direction;
-      float motor1_velocity = pot1.read() *2.0;
+    motor1_direction = 1 - motor1_direction;
+    float motor1_velocity = pot1.read() *2.0;
     pc.baud(115200);
     pc.printf("Velocity is %f \n", motor1_velocity);
 }
@@ -26,8 +26,6 @@
 {
     motor1_pwm.period_us(60.0); // 60 microseconds PWM period, 16.7 kHz, defines all PWM pins (only needs to done once), FastPWM variabele
     MotorInterrupt.attach(Motor, 0.5); // Ticker die de functie Motor aanroept elke halve seconde, meer tijd is tragere respons op potmeter
-    but2.rise(buttonpress);
-    
-   
+    but2.rise(buttonpress); 
     while(true){} // Endless loop  
 }
\ No newline at end of file