Gunar Kroeger / Mbed OS PID_floating_ball

Dependencies:   TextLCD

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Files at this revision

API Documentation at this revision

Comitter:
gunarthon
Date:
Fri Jul 07 00:16:14 2017 +0000
Parent:
42:b69538bba4f9
Commit message:
final version

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jul 05 21:05:56 2017 +0000
+++ b/main.cpp	Fri Jul 07 00:16:14 2017 +0000
@@ -33,6 +33,7 @@
 
 //Pins
 PwmOut          outPin(D3);
+DigitalOut      led1(LED1);
 //DigitalOut      led2(LED2);
 DigitalOut      led3(LED3);
 AnalogIn        buttons(A0);
@@ -84,8 +85,6 @@
 {
     while(true)
     {
-        led3 = !led3;
-        
         double lastPwm = pidController->getLastPwm();
         double lastInput = pidController->getLastInput();
         
@@ -377,7 +376,8 @@
     setPointThread.start(setPointMethode);
     
     while (true) {
-        Thread::wait(1100);
+        Thread::wait(1000);
+        led3 != led3;
     }
 }