asadas
Dependencies: mbed
main.cpp@0:125c2a60bb2a, 2016-09-21 (annotated)
- Committer:
- erweson
- Date:
- Wed Sep 21 22:15:32 2016 +0000
- Revision:
- 0:125c2a60bb2a
Teste
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
erweson | 0:125c2a60bb2a | 1 | #include "mbed.h" |
erweson | 0:125c2a60bb2a | 2 | |
erweson | 0:125c2a60bb2a | 3 | DigitalOut gpo(D0); |
erweson | 0:125c2a60bb2a | 4 | DigitalOut led(LED_RED); |
erweson | 0:125c2a60bb2a | 5 | |
erweson | 0:125c2a60bb2a | 6 | int main() |
erweson | 0:125c2a60bb2a | 7 | { |
erweson | 0:125c2a60bb2a | 8 | while (true) { |
erweson | 0:125c2a60bb2a | 9 | gpo = !gpo; // toggle pin |
erweson | 0:125c2a60bb2a | 10 | led = !led; // toggle led |
erweson | 0:125c2a60bb2a | 11 | wait(0.2f); |
erweson | 0:125c2a60bb2a | 12 | } |
erweson | 0:125c2a60bb2a | 13 | } |