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:9d24d00cefce
diff -r 000000000000 -r 9d24d00cefce main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Oct 04 15:47:38 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+DigitalOut redled(p23);
+DigitalOut greenled(p24);
+DigitalOut yellowled(p22);
+
+
+int main() {
+ while(1) { //repeat indefinitely while true
+ redled = 1; //turn on red led
+ wait(1.0); //wait 1s
+ redled = 0; //turn off red led
+ yellowled = 1; //turn on yellow led
+ wait(1.0); //wait 1s
+ yellowled = 0; //turn off yellow led
+ greenled = 1; //turn on green led
+ wait(1.0); //wait 1s
+ greenled = 0; //turn off green led
+ }
+}