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:
- titig
- Date:
- 2020-10-30
- Revision:
- 1:bc8b34ea89fb
- Parent:
- 0:5391ae63bb4d
File content as of revision 1:bc8b34ea89fb:
#include "mbed.h"
DigitalOut trafficYellowLight(p5);
DigitalIn pedestrianButton(p6);
int main() {
trafficYellowLight=1;
while (1) {
trafficYellowLight = !pedestrianButton;
if (pedestrianButton){ //once button is set to ON
while(1){
trafficYellowLight =!trafficYellowLight;
wait(1);
}
}
wait_ms(50);
}
}