Arduino_BlinkWithoutDelay_Timeout sample code ported. It should work according to mbed Handbook, BUT IT DOESN'T!!! Do you have any idea?

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
homayoun
Date:
Wed Sep 03 10:45:25 2014 +0000
Commit message:
Arduino_BlinkWithoutDelay_Timeout

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 03 10:45:25 2014 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+ 
+Timeout flipper;
+DigitalOut led1(LED1);
+
+void flip() {
+    led1 = !led1;
+}
+
+void setup() {
+  flipper.attach(&flip, 1.0); // setup flipper to call flip after 1 seconds
+}
+
+void loop() {
+  // put your main code here, to run repeatedly: 
+    
+}
+
+int main()
+{
+    setup();
+    while(1) loop();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Sep 03 10:45:25 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file