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.
Revision 0:30f1f15a8151, committed 2017-09-20
- Comitter:
- mdidrich
- Date:
- Wed Sep 20 05:52:15 2017 +0000
- Commit message:
- Martin
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 20 05:52:15 2017 +0000 @@ -0,0 +1,56 @@ +#include "mbed.h" + +DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4); + +Ticker ticker1, ticker2, ticker3, ticker4; +int l1, l2, l3, l4; + +void blink1() +{ + if(l1 == 0) { + led1 = 1; + } else { + led1 = 0; + } +} + +void blink2() +{ + if(l2 == 0) { + led2 = 1; + } else { + led2 = 0; + } +} +void blink3() +{ + if(l3 == 0) { + led3 = 1; + } else { + led3 = 0; + } +} + +void blink4() +{ + if(l4 == 0) { + led4 = 1; + } else { + led4 = 0; + } +} +int main() +{ + + ticker1.attach(&blink1, 0.5); + ticker2.attach(&blink2, 0.15); + ticker3.attach(&blink3, 0.07); + ticker4.attach(&blink4, 0.05); + + while(1) { + l1 = led1; + l2 = led2; + l3 = led3; + l4 = led4; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 20 05:52:15 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/675da3299148 \ No newline at end of file