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:406a15424f95, 2019-10-12 (annotated)
- Committer:
- huangjian
- Date:
- Sat Oct 12 12:21:36 2019 +0000
- Revision:
- 0:406a15424f95
1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| huangjian | 0:406a15424f95 | 1 | #include "mbed.h" |
| huangjian | 0:406a15424f95 | 2 | |
| huangjian | 0:406a15424f95 | 3 | DigitalOut myled(LED1); |
| huangjian | 0:406a15424f95 | 4 | |
| huangjian | 0:406a15424f95 | 5 | int main() { |
| huangjian | 0:406a15424f95 | 6 | while(1) { |
| huangjian | 0:406a15424f95 | 7 | myled = 1; // LED is ON |
| huangjian | 0:406a15424f95 | 8 | wait(0.2); // 200 ms |
| huangjian | 0:406a15424f95 | 9 | myled = 0; // LED is OFF |
| huangjian | 0:406a15424f95 | 10 | wait(1.0); // 1 sec |
| huangjian | 0:406a15424f95 | 11 | |
| huangjian | 0:406a15424f95 | 12 | } |
| huangjian | 0:406a15424f95 | 13 | } |