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:
- 2:43fcdbbbb571
- Parent:
- 0:6daded590538
--- a/main.cpp Tue Jul 11 13:37:31 2017 +0800 +++ b/main.cpp Tue Apr 17 15:17:54 2018 +0800 @@ -1,11 +1,10 @@ #include "mbed.h" #include "rtos.h" -DigitalOut LED[4] = { - DigitalOut(PD_8), // rgbled_B - DigitalOut(PD_9), // rgbled_R - DigitalOut(PA_4), // rgbled_G - DigitalOut(PG_0) // greenled +DigitalOut LED[3] = { + DigitalOut(LED1), + DigitalOut(LED2), + DigitalOut(LED3) }; void blink(void const *n) { @@ -16,11 +15,9 @@ RtosTimer led_1_timer(blink, osTimerPeriodic, (void *)0); RtosTimer led_2_timer(blink, osTimerPeriodic, (void *)1); RtosTimer led_3_timer(blink, osTimerPeriodic, (void *)2); - RtosTimer led_4_timer(blink, osTimerPeriodic, (void *)3); led_1_timer.start(2000); led_2_timer.start(1000); led_3_timer.start(500); - led_4_timer.start(250); Thread::wait(osWaitForever); }