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
main.cpp@0:63f67464aa31, 2015-03-28 (annotated)
- Committer:
- damcclos
- Date:
- Sat Mar 28 22:57:26 2015 +0000
- Revision:
- 0:63f67464aa31
- Child:
- 1:0940fc3527d9
First
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| damcclos | 0:63f67464aa31 | 1 | #include "mbed.h" |
| damcclos | 0:63f67464aa31 | 2 | |
| damcclos | 0:63f67464aa31 | 3 | DigitalOut gpo(D0); |
| damcclos | 0:63f67464aa31 | 4 | DigitalOut led(LED_RED); |
| damcclos | 0:63f67464aa31 | 5 | |
| damcclos | 0:63f67464aa31 | 6 | int main() |
| damcclos | 0:63f67464aa31 | 7 | { |
| damcclos | 0:63f67464aa31 | 8 | while (true) { |
| damcclos | 0:63f67464aa31 | 9 | gpo = !gpo; // toggle pin |
| damcclos | 0:63f67464aa31 | 10 | led = !led; // toggle led |
| damcclos | 0:63f67464aa31 | 11 | wait(0.2f); |
| damcclos | 0:63f67464aa31 | 12 | } |
| damcclos | 0:63f67464aa31 | 13 | } |