Zhang Xin yu
/
test
5555555555
main.cpp@0:2d14501962ab, 2019-03-19 (annotated)
- Committer:
- Jenny121
- Date:
- Tue Mar 19 03:16:01 2019 +0000
- Revision:
- 0:2d14501962ab
111
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jenny121 | 0:2d14501962ab | 1 | // test draft |
Jenny121 | 0:2d14501962ab | 2 | #include "mbed.h" |
Jenny121 | 0:2d14501962ab | 3 | |
Jenny121 | 0:2d14501962ab | 4 | DigitalOut gpo(D0); |
Jenny121 | 0:2d14501962ab | 5 | DigitalOut led(LED_RED); |
Jenny121 | 0:2d14501962ab | 6 | |
Jenny121 | 0:2d14501962ab | 7 | int main() |
Jenny121 | 0:2d14501962ab | 8 | { |
Jenny121 | 0:2d14501962ab | 9 | while (true) { |
Jenny121 | 0:2d14501962ab | 10 | gpo = !gpo; // toggle pin |
Jenny121 | 0:2d14501962ab | 11 | led = !led; // toggle led |
Jenny121 | 0:2d14501962ab | 12 | wait(0.2f); |
Jenny121 | 0:2d14501962ab | 13 | } |
Jenny121 | 0:2d14501962ab | 14 | } |