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: HIDScope MODSERIAL QEI mbed
main.cpp@0:3df25d5b2946, 2015-09-23 (annotated)
- Committer:
- Gerth
- Date:
- Wed Sep 23 10:53:36 2015 +0000
- Revision:
- 0:3df25d5b2946
- Child:
- 1:f367ab17bc18
start of program;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Gerth | 0:3df25d5b2946 | 1 | #include "mbed.h" |
| Gerth | 0:3df25d5b2946 | 2 | |
| Gerth | 0:3df25d5b2946 | 3 | DigitalOut gpo(D0); |
| Gerth | 0:3df25d5b2946 | 4 | DigitalOut led(LED_RED); |
| Gerth | 0:3df25d5b2946 | 5 | |
| Gerth | 0:3df25d5b2946 | 6 | int main() |
| Gerth | 0:3df25d5b2946 | 7 | { |
| Gerth | 0:3df25d5b2946 | 8 | while (true) { |
| Gerth | 0:3df25d5b2946 | 9 | gpo = !gpo; // toggle pin |
| Gerth | 0:3df25d5b2946 | 10 | led = !led; // toggle led |
| Gerth | 0:3df25d5b2946 | 11 | wait(0.2f); |
| Gerth | 0:3df25d5b2946 | 12 | } |
| Gerth | 0:3df25d5b2946 | 13 | } |