Arduino_BlinkWithoutDelay_Timeout sample code ported. It should work according to mbed Handbook, BUT IT DOESN'T!!! Do you have any idea?
Revision 0:ddd5359cb1e3, committed 2014-09-03
- 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 |
diff -r 000000000000 -r ddd5359cb1e3 main.cpp --- /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(); +}
diff -r 000000000000 -r ddd5359cb1e3 mbed.bld --- /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