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:a155ee39e1ed, 2015-05-22 (annotated)
- Committer:
- akshaya
- Date:
- Fri May 22 17:06:27 2015 +0000
- Revision:
- 0:a155ee39e1ed
changed led 1 to led3
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| akshaya | 0:a155ee39e1ed | 1 | #include "mbed.h" |
| akshaya | 0:a155ee39e1ed | 2 | |
| akshaya | 0:a155ee39e1ed | 3 | DigitalOut gpo(D0); |
| akshaya | 0:a155ee39e1ed | 4 | DigitalOut led(LED_RED); |
| akshaya | 0:a155ee39e1ed | 5 | |
| akshaya | 0:a155ee39e1ed | 6 | int main() |
| akshaya | 0:a155ee39e1ed | 7 | { |
| akshaya | 0:a155ee39e1ed | 8 | while (true) { |
| akshaya | 0:a155ee39e1ed | 9 | gpo = !gpo; // toggle pin |
| akshaya | 0:a155ee39e1ed | 10 | led = !led; // toggle led |
| akshaya | 0:a155ee39e1ed | 11 | wait(0.2f); |
| akshaya | 0:a155ee39e1ed | 12 | } |
| akshaya | 0:a155ee39e1ed | 13 | } |