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.
main.cpp
00001 #include "mbed.h" 00002 00003 // different type of initializing LED in NUCLEO board 00004 00005 DigitalOut myled1(LED1); // 00006 DigitalOut myled2(PA_5); // LED connected to pin PA5 in board 00007 DigitalOut myled3(D13); // same as PA5. D13 arduino pin format 00008 00009 00010 int main() { 00011 while(1) { 00012 myled1 = 1; // LED is ON 00013 wait(0.2); // 200 ms delay function. 1 is equal to one second 00014 00015 myled2 = 0; // LED is OFF 00016 wait(1); // 1 sec 00017 00018 myled3 = 1; // LED is ON 00019 wait(0.8); // 800 ms 00020 00021 myled1 = 0; // LED is OFF 00022 wait(1); // 1 sec 00023 } 00024 }
Generated on Wed Sep 21 2022 06:45:43 by
1.7.2