Receives a measured height of a ping-pong ball from a PC, and uses it to control the PWM of a fan to keep the height as set with the keypad. Information is shown on the LCD
Fork of mbed-os-example-mbed5-blinky by
Revision 43:5123f24e0b2c, committed 2017-07-07
- 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;
}
}
