led test

Dependencies:   Nucleo_blink_led mbed

Fork of Nucleo_blink_led by han jisan

Committer:
nexseed
Date:
Wed May 04 00:21:14 2016 +0000
Revision:
0:cc00340e998c
Child:
1:77e7371adc59
add led2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nexseed 0:cc00340e998c 1 #include "mbed.h"
nexseed 0:cc00340e998c 2
nexseed 0:cc00340e998c 3 DigitalOut myled1(LED1);
nexseed 0:cc00340e998c 4 DigitalOut myled2(LED2);
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
nexseed 0:cc00340e998c 9 myled2 = 0;
nexseed 0:cc00340e998c 10 wait(0.2); // 200 ms
nexseed 0:cc00340e998c 11 myled1 = 0;
nexseed 0:cc00340e998c 12 myled2 = 1; // LED is ON
nexseed 0:cc00340e998c 13 myled2 = 0;
nexseed 0:cc00340e998c 14 wait(0.2); // 200 ms
nexseed 0:cc00340e998c 15 }
nexseed 0:cc00340e998c 16 }