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
- Committer:
- malyuskin
- Date:
- 2021-03-08
- Revision:
- 1:2abf3e443afa
- Parent:
- 0:a8a8e4580a01
File content as of revision 1:2abf3e443afa:
// blinking multiple LEDs with the same blinking rate //two LEDs are connected to pins D10 and D12 #include "mbed.h" DigitalOut myled1(D10); //output digital pin D10 DigitalOut myled2(D12); //output digital pin D10 int main() { double blinkRate = 0.5; //blink rate 500ms while(1) { myled1 = 0; // LED1 is OFF myled2 = 1; // LED1 is ON wait(blinkRate); // myled1 = 1; // LED2 is ON myled2 = 0; // LED2 is OFF wait(blinkRate); // } }