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:c3f599163b8a, 2017-12-22 (annotated)
- Committer:
- MarcBonnier
- Date:
- Fri Dec 22 22:23:57 2017 +0000
- Revision:
- 0:c3f599163b8a
- Child:
- 1:03b1f388ee69
f
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MarcBonnier | 0:c3f599163b8a | 1 | #include "mbed.h" |
| MarcBonnier | 0:c3f599163b8a | 2 | |
| MarcBonnier | 0:c3f599163b8a | 3 | DigitalOut myled(LED1); |
| MarcBonnier | 0:c3f599163b8a | 4 | |
| MarcBonnier | 0:c3f599163b8a | 5 | int main() { |
| MarcBonnier | 0:c3f599163b8a | 6 | while(1) { |
| MarcBonnier | 0:c3f599163b8a | 7 | myled = 1; // LED is ON |
| MarcBonnier | 0:c3f599163b8a | 8 | wait(0.2); // 200 ms |
| MarcBonnier | 0:c3f599163b8a | 9 | myled = 0; // LED is OFF |
| MarcBonnier | 0:c3f599163b8a | 10 | wait(1.0); // 1 sec |
| MarcBonnier | 0:c3f599163b8a | 11 | } |
| MarcBonnier | 0:c3f599163b8a | 12 | } |