Nicolas Carvallo
/
Nucleo_blink_led
testing first time
main.cpp@0:562f6a8b56f7, 2017-03-20 (annotated)
- Committer:
- nicocarv
- Date:
- Mon Mar 20 10:34:56 2017 +0000
- Revision:
- 0:562f6a8b56f7
probando commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nicocarv | 0:562f6a8b56f7 | 1 | #include "mbed.h" |
nicocarv | 0:562f6a8b56f7 | 2 | |
nicocarv | 0:562f6a8b56f7 | 3 | DigitalOut myled(LED1); |
nicocarv | 0:562f6a8b56f7 | 4 | |
nicocarv | 0:562f6a8b56f7 | 5 | int main() { |
nicocarv | 0:562f6a8b56f7 | 6 | while(1) { |
nicocarv | 0:562f6a8b56f7 | 7 | myled = 1; // LED is ON |
nicocarv | 0:562f6a8b56f7 | 8 | wait(0.2); // 200 ms |
nicocarv | 0:562f6a8b56f7 | 9 | myled = 0; // LED is OFF |
nicocarv | 0:562f6a8b56f7 | 10 | wait(1.0); // 1 sec |
nicocarv | 0:562f6a8b56f7 | 11 | } |
nicocarv | 0:562f6a8b56f7 | 12 | } |