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.
Fork of el17z2q by
main.cpp@0:f707ce1010fa, 2018-04-17 (annotated)
- Committer:
- yzjdxl
- Date:
- Tue Apr 17 08:43:38 2018 +0000
- Revision:
- 0:f707ce1010fa
- Child:
- 1:00a4ea97c4cd
initial commmit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yzjdxl | 0:f707ce1010fa | 1 | #include "mbed.h" |
yzjdxl | 0:f707ce1010fa | 2 | |
yzjdxl | 0:f707ce1010fa | 3 | DigitalOut gpo(D0); |
yzjdxl | 0:f707ce1010fa | 4 | DigitalOut led(LED_RED); |
yzjdxl | 0:f707ce1010fa | 5 | |
yzjdxl | 0:f707ce1010fa | 6 | int main() |
yzjdxl | 0:f707ce1010fa | 7 | { |
yzjdxl | 0:f707ce1010fa | 8 | while (true) { |
yzjdxl | 0:f707ce1010fa | 9 | gpo = !gpo; // toggle pin |
yzjdxl | 0:f707ce1010fa | 10 | led = !led; // toggle led |
yzjdxl | 0:f707ce1010fa | 11 | wait(0.2f); |
yzjdxl | 0:f707ce1010fa | 12 | } |
yzjdxl | 0:f707ce1010fa | 13 | } |