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