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@1:d93dc1b9574a, 2015-10-19 (annotated)
- Committer:
- NickDGreg
- Date:
- Mon Oct 19 08:55:13 2015 +0000
- Revision:
- 1:d93dc1b9574a
- Parent:
- 0:82d3afcdfbb5
header file for update
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| NickDGreg | 0:82d3afcdfbb5 | 1 | #include "mbed.h" |
| NickDGreg | 0:82d3afcdfbb5 | 2 | |
| NickDGreg | 0:82d3afcdfbb5 | 3 | DigitalOut gpo(D0); |
| NickDGreg | 0:82d3afcdfbb5 | 4 | DigitalOut led(LED_RED); |
| NickDGreg | 0:82d3afcdfbb5 | 5 | |
| NickDGreg | 0:82d3afcdfbb5 | 6 | int main() |
| NickDGreg | 0:82d3afcdfbb5 | 7 | { |
| NickDGreg | 0:82d3afcdfbb5 | 8 | while (true) { |
| NickDGreg | 0:82d3afcdfbb5 | 9 | gpo = !gpo; // toggle pin |
| NickDGreg | 0:82d3afcdfbb5 | 10 | led = !led; // toggle led |
| NickDGreg | 0:82d3afcdfbb5 | 11 | wait(0.2f); |
| NickDGreg | 0:82d3afcdfbb5 | 12 | } |
| NickDGreg | 0:82d3afcdfbb5 | 13 | } |