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:b6ae7abdff7e, 2017-09-22 (annotated)
- Committer:
- Hinz
- Date:
- Fri Sep 22 13:45:02 2017 +0000
- Revision:
- 0:b6ae7abdff7e
- Child:
- 1:c5711c7e5b46
for nucleol423kc
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Hinz | 0:b6ae7abdff7e | 1 | #include "mbed.h" |
| Hinz | 0:b6ae7abdff7e | 2 | |
| Hinz | 0:b6ae7abdff7e | 3 | DigitalOut myled2(D2); |
| Hinz | 0:b6ae7abdff7e | 4 | DigitalOut myled3(D3); |
| Hinz | 0:b6ae7abdff7e | 5 | |
| Hinz | 0:b6ae7abdff7e | 6 | int main() { |
| Hinz | 0:b6ae7abdff7e | 7 | while(1) { |
| Hinz | 0:b6ae7abdff7e | 8 | myled2 = 1; // LED is ON |
| Hinz | 0:b6ae7abdff7e | 9 | myled3 = 0; // LED is ON |
| Hinz | 0:b6ae7abdff7e | 10 | wait(0.2); // 200 ms |
| Hinz | 0:b6ae7abdff7e | 11 | myled2 = 0; // LED is OFF |
| Hinz | 0:b6ae7abdff7e | 12 | myled3 = 1; // LED is ON |
| Hinz | 0:b6ae7abdff7e | 13 | wait(1.0); // 1 sec |
| Hinz | 0:b6ae7abdff7e | 14 | } |
| Hinz | 0:b6ae7abdff7e | 15 | } |