Riko Tandil
/
Nucleo_blink_led_jy
Blink LED
main.cpp@0:39f39b8a8242, 2017-02-27 (annotated)
- Committer:
- rtandil
- Date:
- Mon Feb 27 08:52:08 2017 +0000
- Revision:
- 0:39f39b8a8242
- Child:
- 1:65712b489c3e
First commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rtandil | 0:39f39b8a8242 | 1 | #include "mbed.h" |
rtandil | 0:39f39b8a8242 | 2 | |
rtandil | 0:39f39b8a8242 | 3 | DigitalOut myled(LED1); |
rtandil | 0:39f39b8a8242 | 4 | |
rtandil | 0:39f39b8a8242 | 5 | int main() { |
rtandil | 0:39f39b8a8242 | 6 | while(1) { |
rtandil | 0:39f39b8a8242 | 7 | myled = 1; // LED is ON |
rtandil | 0:39f39b8a8242 | 8 | wait(0.2); // 200 ms |
rtandil | 0:39f39b8a8242 | 9 | myled = 0; // LED is OFF |
rtandil | 0:39f39b8a8242 | 10 | wait(1.0); // 1 sec |
rtandil | 0:39f39b8a8242 | 11 | } |
rtandil | 0:39f39b8a8242 | 12 | } |