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:cc5294a00e8a
diff -r 000000000000 -r cc5294a00e8a main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Nov 16 15:46:17 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h" //needs to be here
+
+// my program to flash leds
+// written on 16/11/15 by Ward Broughton
+
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+
+int main() {
+ while(1) { //repeat forever
+ myled1=1; //led1 on
+ myled2=0;
+ wait(1);
+
+ myled2=1; //led2 on
+ myled1=0;
+ wait(1);
+
+ myled1=2; //both on
+ myled2=1;
+ wait(1);
+
+ }
+}