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:cc562f78f889, 2018-04-25 (annotated)
- Committer:
- lucasfontenla
- Date:
- Wed Apr 25 11:37:14 2018 +0000
- Revision:
- 0:cc562f78f889
- Child:
- 1:b2e395e50a45
OIIII
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| lucasfontenla | 0:cc562f78f889 | 1 | #include "mbed.h" |
| lucasfontenla | 0:cc562f78f889 | 2 | |
| lucasfontenla | 0:cc562f78f889 | 3 | DigitalOut myled(LED1); |
| lucasfontenla | 0:cc562f78f889 | 4 | |
| lucasfontenla | 0:cc562f78f889 | 5 | int main() { |
| lucasfontenla | 0:cc562f78f889 | 6 | while(1) { |
| lucasfontenla | 0:cc562f78f889 | 7 | myled = 1; // LED is ON |
| lucasfontenla | 0:cc562f78f889 | 8 | wait(0.2); // 200 ms |
| lucasfontenla | 0:cc562f78f889 | 9 | myled = 0; // LED is OFF |
| lucasfontenla | 0:cc562f78f889 | 10 | wait(1.0); // 1 sec |
| lucasfontenla | 0:cc562f78f889 | 11 | } |
| lucasfontenla | 0:cc562f78f889 | 12 | } |