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:2a941acd6108, 2017-02-03 (annotated)
- Committer:
- bcc6
- Date:
- Fri Feb 03 08:34:55 2017 +0000
- Revision:
- 0:2a941acd6108
Blinky LED HelloWorld
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| bcc6 | 0:2a941acd6108 | 1 | #include "mbed.h" |
| bcc6 | 0:2a941acd6108 | 2 | |
| bcc6 | 0:2a941acd6108 | 3 | DigitalOut led1(p16); |
| bcc6 | 0:2a941acd6108 | 4 | |
| bcc6 | 0:2a941acd6108 | 5 | // main() runs in its own thread in the OS |
| bcc6 | 0:2a941acd6108 | 6 | // (note the calls to wait below for delays) |
| bcc6 | 0:2a941acd6108 | 7 | int main() { |
| bcc6 | 0:2a941acd6108 | 8 | while (true) { |
| bcc6 | 0:2a941acd6108 | 9 | led1 = !led1; |
| bcc6 | 0:2a941acd6108 | 10 | wait(0.5); |
| bcc6 | 0:2a941acd6108 | 11 | } |
| bcc6 | 0:2a941acd6108 | 12 | } |
| bcc6 | 0:2a941acd6108 | 13 |