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:
- 1:fdcb0bfe75b7
- Parent:
- 0:6b2314a40652
- Child:
- 2:39e295fcc23d
--- a/main.cpp Mon Oct 12 23:21:55 2020 +0000 +++ b/main.cpp Mon Oct 12 23:22:33 2020 +0000 @@ -31,4 +31,21 @@ LEDOut3 = !LEDOut3; } +int second() +{ + tickerLED1.attach(&changeLED1,0.2); //the address of the function to call + //and the interval in seconds between + //calls to that function + tickerLED3.attach(&changeLED3,0.8); //changing the interval in seconds for LED3 + while(1) { + wait(0.1); + wait(0.1); + wait(0.1); + wait(0.1); + wait(0.1); + //the main loop is spinning every 500ms, but the LED needs to go faster! + } //while +} + +