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@11:012b1294c1c4, 2017-06-23 (annotated)
- Committer:
- sarahmarshy
- Date:
- Fri Jun 23 15:11:31 2017 -0500
- Revision:
- 11:012b1294c1c4
- Parent:
- 10:dc33cd3f4eb9
"Update mbed-os"
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| emilmont | 1:491820ee784d | 1 | #include "mbed.h" |
| emilmont | 1:491820ee784d | 2 | |
| emilmont | 1:491820ee784d | 3 | DigitalOut led1(LED1); |
| emilmont | 1:491820ee784d | 4 | DigitalOut led2(LED2); |
| geky | 7:8d9919175929 | 5 | Thread thread; |
| emilmont | 1:491820ee784d | 6 | |
| geky | 7:8d9919175929 | 7 | void led2_thread() { |
| emilmont | 1:491820ee784d | 8 | while (true) { |
| emilmont | 1:491820ee784d | 9 | led2 = !led2; |
| mab5449 | 10:dc33cd3f4eb9 | 10 | wait(1); |
| emilmont | 1:491820ee784d | 11 | } |
| emilmont | 1:491820ee784d | 12 | } |
| emilmont | 1:491820ee784d | 13 | |
| emilmont | 1:491820ee784d | 14 | int main() { |
| geky | 7:8d9919175929 | 15 | thread.start(led2_thread); |
| emilmont | 1:491820ee784d | 16 | |
| emilmont | 1:491820ee784d | 17 | while (true) { |
| emilmont | 1:491820ee784d | 18 | led1 = !led1; |
| mab5449 | 10:dc33cd3f4eb9 | 19 | wait(0.5); |
| emilmont | 1:491820ee784d | 20 | } |
| emilmont | 1:491820ee784d | 21 | } |