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:ff8004800027
diff -r 000000000000 -r ff8004800027 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jul 23 10:39:58 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+Timeout timeout;
+DigitalOut led(LED1);
+
+int on = 1;
+
+void attimeout(){
+ on = 0;
+}
+
+int main() {
+ timeout.attach(&attimeout, 5);
+
+ // spin in a main loop. flipper will interrupt it to call flip
+ while(on) {
+ led = !led;
+ wait(0.2);
+ }
+}
\ No newline at end of file