Patrick Shaughnessy
/
test
tt
main.cpp@0:de1a47c57e55, 2017-03-07 (annotated)
- Committer:
- PaddyShocks
- Date:
- Tue Mar 07 12:47:55 2017 +0000
- Revision:
- 0:de1a47c57e55
test;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
PaddyShocks | 0:de1a47c57e55 | 1 | #include "mbed.h" |
PaddyShocks | 0:de1a47c57e55 | 2 | |
PaddyShocks | 0:de1a47c57e55 | 3 | DigitalOut gpo(D0); |
PaddyShocks | 0:de1a47c57e55 | 4 | DigitalOut led(LED_RED); |
PaddyShocks | 0:de1a47c57e55 | 5 | |
PaddyShocks | 0:de1a47c57e55 | 6 | int main() |
PaddyShocks | 0:de1a47c57e55 | 7 | { |
PaddyShocks | 0:de1a47c57e55 | 8 | while (true) { |
PaddyShocks | 0:de1a47c57e55 | 9 | gpo = !gpo; // toggle pin |
PaddyShocks | 0:de1a47c57e55 | 10 | led = !led; // toggle led |
PaddyShocks | 0:de1a47c57e55 | 11 | wait(0.2f); |
PaddyShocks | 0:de1a47c57e55 | 12 | } |
PaddyShocks | 0:de1a47c57e55 | 13 | } |