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.
Dependencies: mbed
Fork of Exercise6 by
main.cpp@0:cb7457d7c822, 2020-02-24 (annotated)
- Committer:
- drewantech
- Date:
- Mon Feb 24 13:09:19 2020 +0000
- Revision:
- 0:cb7457d7c822
- Child:
- 1:245bc5eb1bbe
Exercise 1 for Chloe.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| drewantech | 0:cb7457d7c822 | 1 | #include "mbed.h" |
| drewantech | 0:cb7457d7c822 | 2 | |
| drewantech | 0:cb7457d7c822 | 3 | DigitalOut myled(LED1); |
| drewantech | 0:cb7457d7c822 | 4 | |
| drewantech | 0:cb7457d7c822 | 5 | int main() { |
| drewantech | 0:cb7457d7c822 | 6 | while(1) { |
| drewantech | 0:cb7457d7c822 | 7 | myled = 1; // LED is ON |
| drewantech | 0:cb7457d7c822 | 8 | wait(0.2); // 200 ms |
| drewantech | 0:cb7457d7c822 | 9 | myled = 0; // LED is OFF |
| drewantech | 0:cb7457d7c822 | 10 | wait(1.0); // 1 sec |
| drewantech | 0:cb7457d7c822 | 11 | } |
| drewantech | 0:cb7457d7c822 | 12 | } |
