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