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: PE_U1_3FarbenLed.cpp
- Revision:
- 0:89fae6e3d91c
diff -r 000000000000 -r 89fae6e3d91c PE_U1_3FarbenLed.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/PE_U1_3FarbenLed.cpp Tue Jan 14 21:44:59 2020 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+DigitalOut redled(p5);
+DigitalOut yellowled(p6);
+DigitalOut blueled(p7);
+
+int main() {
+ while(1) {
+
+ redled = 0;
+ yellowled = 0;
+ blueled = 0;
+
+ wait(0.5);
+
+ redled = 1;
+ yellowled = 0;
+ blueled = 0;
+
+ wait(0.5);
+
+ redled = 1;
+ yellowled = 1;
+ blueled =0;
+ wait(0.5);
+
+ redled = 1;
+ yellowled = 1;
+ blueled =1;
+ wait(0.5);
+ }
+}