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:
- suupen
- Date:
- 2016-10-23
- Revision:
- 0:a7d68fd605f6
- Child:
- 1:ffa16c2a347f
File content as of revision 0:a7d68fd605f6:
#include "mbed.h"
#include "DigitalSw.h"
DigitalSw sw(p21);
DigitalOut level(LED4);
DigitalOut onEdgeToggle(LED1);
DigitalOut offEdgeToggle(LED2);
int main() {
while(1) {
level = sw.getLevel();
if(sw.getOnEdge() == 1){
onEdgeToggle = !onEdgeToggle;
}
if(sw.getOffEdge() == 1){
offEdgeToggle = !offEdgeToggle;
}
}
}