
se agregó un led y se cambio el tiempo a 0.5
main.cpp@2:adcd761ae807, 2018-12-15 (annotated)
- Committer:
- Otakutronics
- Date:
- Sat Dec 15 17:46:54 2018 +0000
- Revision:
- 2:adcd761ae807
- Parent:
- 1:a5b91628cfc6
- Child:
- 3:d61262655cac
se cambio el tiempo a 0.5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Otakutronics | 0:8663eadc1caf | 1 | #include "mbed.h" |
Otakutronics | 0:8663eadc1caf | 2 | |
Otakutronics | 0:8663eadc1caf | 3 | DigitalOut gpo(D0); |
Otakutronics | 0:8663eadc1caf | 4 | DigitalOut led(LED_RED); |
Otakutronics | 1:a5b91628cfc6 | 5 | DigitalOut led2(LED_GREEN); |
Otakutronics | 0:8663eadc1caf | 6 | |
Otakutronics | 0:8663eadc1caf | 7 | int main() |
Otakutronics | 0:8663eadc1caf | 8 | { |
Otakutronics | 0:8663eadc1caf | 9 | while (true) { |
Otakutronics | 0:8663eadc1caf | 10 | gpo = !gpo; // toggle pin |
Otakutronics | 0:8663eadc1caf | 11 | led = !led; // toggle led |
Otakutronics | 1:a5b91628cfc6 | 12 | led2 = !led2; |
Otakutronics | 2:adcd761ae807 | 13 | wait(0.5f); |
Otakutronics | 0:8663eadc1caf | 14 | } |
Otakutronics | 0:8663eadc1caf | 15 | } |