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.
Blinking2Ledswith_SwitchButton.cpp
- Committer:
- kgabriel
- Date:
- 2021-06-04
- Revision:
- 1:f2ac268b3b17
- Parent:
- 0:f792b1ecc7b3
File content as of revision 1:f2ac268b3b17:
#include "mbed.h" DigitalOut redLed(p5); DigitalOut yellowLed(p7); DigitalIn switchButton(p6); int main() { while (1) { if(switchButton==1){ redLed=1; yellowLed=0; } else{ redLed=0; yellowLed=1; } wait(1); } }