Blink 0.2
Dependencies: mbed-STM32F030F4
Fork of STM32F031_blink_LED_2 by
Diff: main.cpp
- Revision:
- 4:696869d55aae
- Parent:
- 3:28b148d0e703
--- a/main.cpp Tue May 12 10:01:15 2015 +0000 +++ b/main.cpp Sun Aug 27 18:37:03 2017 +0000 @@ -25,8 +25,8 @@ /* Variables ---------------------------------------------------------------------*/ // mbed - initialization of peripherals -DigitalOut myled(PA_5); // LED is connected to PA_5 - +DigitalOut myled_ext(PA_5); // LED is connected to PA_5 +DigitalOut myled_onb(PA_4); // LED is connected to PA_4 onboard /* Functions----------------------------------------------------------------------*/ /*********************************************************************************** @@ -38,9 +38,21 @@ ***********************************************************************************/ int main() { while(1) { - myled = 1; // LED is OFF (we have connected it to VCC) - wait(0.2); // 200 ms - myled = 0; // LED is On - wait(1.0); // 1 sec + myled_ext = 1; // LED is OFF (we have connected it to VCC) + + myled_onb = 0; + wait(0.1); // 200 ms + myled_onb = 1; + wait(0.1); // 200 ms + myled_onb = 0; + wait(0.1); // 200 ms + myled_onb = 1; + wait(0.1); // 200 ms + myled_onb = 0; + wait(1.0); // 200 ms + + myled_ext = 0; // LED is On + myled_onb = 1; + wait(2.0); // 1 sec } }