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:421d6f8bd00c, 2020-04-07 (annotated)
- Committer:
- adrianofsp
- Date:
- Tue Apr 07 13:19:35 2020 +0000
- Revision:
- 0:421d6f8bd00c
Test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| adrianofsp | 0:421d6f8bd00c | 1 | #include "mbed.h" |
| adrianofsp | 0:421d6f8bd00c | 2 | |
| adrianofsp | 0:421d6f8bd00c | 3 | DigitalOut myled(LED1); |
| adrianofsp | 0:421d6f8bd00c | 4 | |
| adrianofsp | 0:421d6f8bd00c | 5 | int main() { |
| adrianofsp | 0:421d6f8bd00c | 6 | while(1) { |
| adrianofsp | 0:421d6f8bd00c | 7 | myled = 1; // LED is ON |
| adrianofsp | 0:421d6f8bd00c | 8 | wait(0.2); // 200 ms |
| adrianofsp | 0:421d6f8bd00c | 9 | myled = 0; // LED is OFF |
| adrianofsp | 0:421d6f8bd00c | 10 | wait(1.0); // 1 sec |
| adrianofsp | 0:421d6f8bd00c | 11 | } |
| adrianofsp | 0:421d6f8bd00c | 12 | } |