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:61b18b631f94, 2016-08-17 (annotated)
- Committer:
- ziadeldebri
- Date:
- Wed Aug 17 19:07:22 2016 +0000
- Revision:
- 0:61b18b631f94
- Child:
- 3:b787aa49b900
API test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ziadeldebri | 0:61b18b631f94 | 1 | #include "mbed.h" |
ziadeldebri | 0:61b18b631f94 | 2 | |
ziadeldebri | 0:61b18b631f94 | 3 | DigitalOut gpo(D0); |
ziadeldebri | 0:61b18b631f94 | 4 | DigitalOut led(LED_RED); |
ziadeldebri | 0:61b18b631f94 | 5 | |
ziadeldebri | 0:61b18b631f94 | 6 | int main() |
ziadeldebri | 0:61b18b631f94 | 7 | { |
ziadeldebri | 0:61b18b631f94 | 8 | while (true) { |
ziadeldebri | 0:61b18b631f94 | 9 | gpo = !gpo; // toggle pin |
ziadeldebri | 0:61b18b631f94 | 10 | led = !led; // toggle led |
ziadeldebri | 0:61b18b631f94 | 11 | wait(0.2f); |
ziadeldebri | 0:61b18b631f94 | 12 | } |
ziadeldebri | 0:61b18b631f94 | 13 | } |