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.
Dependencies: mbed
Revision 0:b2e9baae81b3, committed 2015-02-17
- Comitter:
- mb4899
- Date:
- Tue Feb 17 11:44:05 2015 +0000
- Commit message:
- Uses two tickers to create square wave outputs to the LED's
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 Tue Feb 17 11:44:05 2015 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + +Ticker flipper1; +Ticker flipper2; +DigitalOut myLED(LED1); +DigitalOut myLED2(LED2); + +void flip1() +{ + myLED = !myLED; +} + +void flip2() +{ + myLED2 = !myLED2; +} + +int main() +{ + myLED = 0; + myLED2 = 0; + flipper1.attach(&flip1, 0.2); + flipper2.attach(&flip2, 1.0); + + while(1) + { + wait(0.2); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Feb 17 11:44:05 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac \ No newline at end of file