led test
Dependencies: Nucleo_blink_led mbed
Fork of Nucleo_blink_led by
main.cpp@1:77e7371adc59, 2018-01-02 (annotated)
- Committer:
- Yasfa
- Date:
- Tue Jan 02 06:16:33 2018 +0000
- Revision:
- 1:77e7371adc59
- Parent:
- 0:cc00340e998c
Yasfa
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nexseed | 0:cc00340e998c | 1 | #include "mbed.h" |
nexseed | 0:cc00340e998c | 2 | |
Yasfa | 1:77e7371adc59 | 3 | DigitalOut myled1(LED2); |
Yasfa | 1:77e7371adc59 | 4 | DigitalOut myled3(LED3); |
nexseed | 0:cc00340e998c | 5 | |
nexseed | 0:cc00340e998c | 6 | int main() { |
nexseed | 0:cc00340e998c | 7 | while(1) { |
nexseed | 0:cc00340e998c | 8 | myled1 = 1; // LED is ON |
Yasfa | 1:77e7371adc59 | 9 | myled3 = 0; |
nexseed | 0:cc00340e998c | 10 | wait(0.2); // 200 ms |
nexseed | 0:cc00340e998c | 11 | myled1 = 0; |
Yasfa | 1:77e7371adc59 | 12 | myled3 = 1; // LED is ON |
Yasfa | 1:77e7371adc59 | 13 | myled3 = 0; |
nexseed | 0:cc00340e998c | 14 | wait(0.2); // 200 ms |
nexseed | 0:cc00340e998c | 15 | } |
nexseed | 0:cc00340e998c | 16 | } |