Gijs van Oort
/
frdm_gpio2
van Gijs
main.cpp@1:193ae4c1bdf3, 2018-09-10 (annotated)
- Committer:
- Gijsvanoort
- Date:
- Mon Sep 10 22:55:40 2018 +0000
- Revision:
- 1:193ae4c1bdf3
- Parent:
- 0:d3387262128f
- Child:
- 2:e5b61410381c
Made red
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Gijsvanoort | 0:d3387262128f | 1 | #include "mbed.h" |
Gijsvanoort | 0:d3387262128f | 2 | |
Gijsvanoort | 0:d3387262128f | 3 | DigitalOut gpo(D0); |
Gijsvanoort | 1:193ae4c1bdf3 | 4 | DigitalOut led(LED_RED); |
Gijsvanoort | 0:d3387262128f | 5 | |
Gijsvanoort | 0:d3387262128f | 6 | int main() |
Gijsvanoort | 0:d3387262128f | 7 | { |
Gijsvanoort | 0:d3387262128f | 8 | while (true) { |
Gijsvanoort | 0:d3387262128f | 9 | gpo = !gpo; // toggle pin |
Gijsvanoort | 0:d3387262128f | 10 | led = !led; // toggle led |
Gijsvanoort | 0:d3387262128f | 11 | wait(0.2f); |
Gijsvanoort | 0:d3387262128f | 12 | } |
Gijsvanoort | 0:d3387262128f | 13 | } |