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.
Diff: main.cpp
- Revision:
- 2:51248529975d
- Parent:
- 1:b483225a5411
- Child:
- 3:3cc8759a826f
--- a/main.cpp Tue Sep 11 15:19:12 2018 +0000
+++ b/main.cpp Tue Sep 11 15:24:39 2018 +0000
@@ -24,14 +24,20 @@
{
case 'r': //If the input character is r
ledr = !ledr;
+ ledb=1;
+ ledg=1;
break;
case 'b': //If the input character is b
ledb = !ledb;
+ ledr=1;
+ ledg=1;
break;
case 'g': //If the input character is g
ledg= !ledg;
+ ledb=1;
+ ledr=1;
break;
default:
@@ -44,12 +50,8 @@
{
blink.attach(BlinkLed,1); //Gaat elke seconde checken
pc.baud(115200); //Instelling voor pc
-
- char c; // Maak character c aan
- c = pc.getc(); // Maak die gelijk aan ingevoerde character
-
+
while (true) {
- currentState = c;
- BlinkLed();
+ currentState = pc.getc();
}
}
\ No newline at end of file