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:cbfa5cd9558b, 2018-11-08 (annotated)
- Committer:
- lmottola
- Date:
- Thu Nov 08 12:33:01 2018 +0000
- Revision:
- 0:cbfa5cd9558b
Initial commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| lmottola | 0:cbfa5cd9558b | 1 | #include "mbed.h" |
| lmottola | 0:cbfa5cd9558b | 2 | |
| lmottola | 0:cbfa5cd9558b | 3 | DigitalOut led(LED1); |
| lmottola | 0:cbfa5cd9558b | 4 | |
| lmottola | 0:cbfa5cd9558b | 5 | int main() |
| lmottola | 0:cbfa5cd9558b | 6 | { |
| lmottola | 0:cbfa5cd9558b | 7 | while(1) { |
| lmottola | 0:cbfa5cd9558b | 8 | led = 1; // LED is ON |
| lmottola | 0:cbfa5cd9558b | 9 | wait(0.2); // 200 ms |
| lmottola | 0:cbfa5cd9558b | 10 | led = 0; // LED is OFF |
| lmottola | 0:cbfa5cd9558b | 11 | wait(0.8); // 800 ms |
| lmottola | 0:cbfa5cd9558b | 12 | } |
| lmottola | 0:cbfa5cd9558b | 13 | } |