Nate Napoletano / Mbed 2 deprecated Nucleo_blink_3color

Dependencies:   mbed

Committer:
HliLFINwttJ
Date:
Sat Jan 13 17:03:32 2018 +0000
Revision:
0:dc0fc84700c5
Child:
1:2cbfcd4db580
mod to Nucleo_blink_LED

Who changed what in which revision?

UserRevisionLine numberNew contents of line
HliLFINwttJ 0:dc0fc84700c5 1 #include "mbed.h"
HliLFINwttJ 0:dc0fc84700c5 2
HliLFINwttJ 0:dc0fc84700c5 3 DigitalOut myled1(LED1);
HliLFINwttJ 0:dc0fc84700c5 4 DigitalOut myled2(LED2);
HliLFINwttJ 0:dc0fc84700c5 5 DigitalOut myled3(LED3);
HliLFINwttJ 0:dc0fc84700c5 6
HliLFINwttJ 0:dc0fc84700c5 7 int main() {
HliLFINwttJ 0:dc0fc84700c5 8 while(1) {
HliLFINwttJ 0:dc0fc84700c5 9 myled1 = 1; // LED is ON
HliLFINwttJ 0:dc0fc84700c5 10 wait(0.2); // 200 ms
HliLFINwttJ 0:dc0fc84700c5 11 myled1 = 0; // LED is OFF
HliLFINwttJ 0:dc0fc84700c5 12 wait(1.0); // 1 sec
HliLFINwttJ 0:dc0fc84700c5 13 myled2 = 1; // LED is ON
HliLFINwttJ 0:dc0fc84700c5 14 wait(0.2); // 200 ms
HliLFINwttJ 0:dc0fc84700c5 15 myled2 = 0; // LED is OFF
HliLFINwttJ 0:dc0fc84700c5 16 wait(1.0); // 1 sec
HliLFINwttJ 0:dc0fc84700c5 17 myled3 = 1; // LED is ON
HliLFINwttJ 0:dc0fc84700c5 18 wait(0.2); // 200 ms
HliLFINwttJ 0:dc0fc84700c5 19 myled3 = 0; // LED is OFF
HliLFINwttJ 0:dc0fc84700c5 20 wait(1.0); // 1 sec
HliLFINwttJ 0:dc0fc84700c5 21 }
HliLFINwttJ 0:dc0fc84700c5 22 }