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:
- 0:39ab4ee35afe
- Child:
- 1:fccb9a602d9a
diff -r 000000000000 -r 39ab4ee35afe main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Jan 19 23:52:56 2018 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+
+// main() runs in its own thread in the OS
+int main() {
+ while (true) {
+ led1.write(1);
+ led2.write(0);
+ led3.write(0);
+ wait(0.5);
+
+ led1.write(0);
+ led2.write(1);
+ led3.write(0);
+ wait(0.5);
+
+ led1.write(0);
+ led2.write(0);
+ led3.write(1);
+ wait(0.5);
+ }
+}
+