Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:1e290f8bc775
- Parent:
- 1:2a6e34a26b8a
diff -r 2a6e34a26b8a -r 1e290f8bc775 main.cpp
--- a/main.cpp Tue Sep 19 15:05:55 2017 +0000
+++ b/main.cpp Thu Sep 21 08:49:31 2017 +0000
@@ -1,4 +1,5 @@
#include "mbed.h"
+
AnalogIn button2(A2);
AnalogIn button1(A3); //Analog input of the button1
AnalogIn potmeter(A1); //Analog input of the potmeter
@@ -15,7 +16,7 @@
if (button1 == 0) {
led2 = led2 + 0.1; //De led krijgt een hogere waarde wanneer button 1 wordt ingedrukt
}
- if (button2 == 0) { //De led krijgt een lagere waarde wanneer button 2 wordt ingedrukt
+ else if (button2 == 0) { //De led krijgt een lagere waarde wanneer button 2 wordt ingedrukt
led2 = led2 - 0.1;
}
else {