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