Tibor Rozsa
/
Nucleo_blink_led
a
main.cpp@0:61879a798452, 2017-01-01 (annotated)
- Committer:
- effman
- Date:
- Sun Jan 01 13:59:06 2017 +0000
- Revision:
- 0:61879a798452
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
effman | 0:61879a798452 | 1 | #include "mbed.h" |
effman | 0:61879a798452 | 2 | |
effman | 0:61879a798452 | 3 | DigitalOut myled(LED1); |
effman | 0:61879a798452 | 4 | |
effman | 0:61879a798452 | 5 | int main() { |
effman | 0:61879a798452 | 6 | while(1) { |
effman | 0:61879a798452 | 7 | myled = 1; // LED is ON |
effman | 0:61879a798452 | 8 | wait(0.2); // 1000 ms |
effman | 0:61879a798452 | 9 | myled = 0; // LED is OFF |
effman | 0:61879a798452 | 10 | wait(1.0); // 1 sec |
effman | 0:61879a798452 | 11 | } |
effman | 0:61879a798452 | 12 | } |