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 107:387feb46d358, committed 2020-08-06
- Comitter:
- yuvrajs
- Date:
- Thu Aug 06 07:22:16 2020 +0000
- Parent:
- 106:d323dd088ba2
- Commit message:
- RGB leds working with this program...
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d323dd088ba2 -r 387feb46d358 main.cpp --- a/main.cpp Fri Nov 22 16:00:04 2019 +0000 +++ b/main.cpp Thu Aug 06 07:22:16 2020 +0000 @@ -8,16 +8,22 @@ // Blinking rate in milliseconds -#define BLINKING_RATE_MS 500 +#define BLINKING_RATE_MS 1000 int main() { // Initialise the digital pin LED1 as an output + DigitalOut led2(LED3); + DigitalOut led1(LED2); DigitalOut led(LED1); while (true) { led = !led; thread_sleep_for(BLINKING_RATE_MS); + led1 =!led1; + thread_sleep_for(BLINKING_RATE_MS); + led2 =!led2; + thread_sleep_for(BLINKING_RATE_MS); } }