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:f02bd2638bdd, 2019-12-14 (annotated)
- Committer:
- youngjae
- Date:
- Sat Dec 14 06:24:11 2019 +0000
- Revision:
- 0:f02bd2638bdd
- Child:
- 1:b9118b4c402e
mbed first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
youngjae | 0:f02bd2638bdd | 1 | #include "mbed.h" |
youngjae | 0:f02bd2638bdd | 2 | |
youngjae | 0:f02bd2638bdd | 3 | DigitalOut led(LED2); |
youngjae | 0:f02bd2638bdd | 4 | |
youngjae | 0:f02bd2638bdd | 5 | int main() |
youngjae | 0:f02bd2638bdd | 6 | { |
youngjae | 0:f02bd2638bdd | 7 | while(1) { |
youngjae | 0:f02bd2638bdd | 8 | led = 1; // LED is ON |
youngjae | 0:f02bd2638bdd | 9 | wait(0.2); // 200 ms |
youngjae | 0:f02bd2638bdd | 10 | led = 0; // LED is OFF |
youngjae | 0:f02bd2638bdd | 11 | wait(0.8); // 800 ms |
youngjae | 0:f02bd2638bdd | 12 | } |
youngjae | 0:f02bd2638bdd | 13 | } |