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@0:5391ae63bb4d, 2020-10-30 (annotated)
- Committer:
- titig
- Date:
- Fri Oct 30 13:59:11 2020 +0000
- Revision:
- 0:5391ae63bb4d
- Child:
- 1:bc8b34ea89fb
Inverse of pedestrian button
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| titig | 0:5391ae63bb4d | 1 | #include "mbed.h" |
| titig | 0:5391ae63bb4d | 2 | |
| titig | 0:5391ae63bb4d | 3 | DigitalOut trafficYellowLight(p5); |
| titig | 0:5391ae63bb4d | 4 | DigitalIn pedestrianButton(p6); |
| titig | 0:5391ae63bb4d | 5 | |
| titig | 0:5391ae63bb4d | 6 | int main() { |
| titig | 0:5391ae63bb4d | 7 | while (1) { |
| titig | 0:5391ae63bb4d | 8 | trafficYellowLight = !pedestrianButton; |
| titig | 0:5391ae63bb4d | 9 | //trafficYellowLight = trafficYellowLight; |
| titig | 0:5391ae63bb4d | 10 | wait_ms(500); |
| titig | 0:5391ae63bb4d | 11 | } |
| titig | 0:5391ae63bb4d | 12 | } |