Sebastiano Graziano / Mbed 2 deprecated Nucleo_blink_led

Dependencies:   mbed

Committer:
sebig
Date:
Tue Dec 22 09:41:43 2015 +0000
Revision:
1:17772f9c7412
Parent:
0:211a15a2175f
Child:
2:ed41596bff69
200ms Test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sebig 0:211a15a2175f 1 #include "mbed.h"
sebig 0:211a15a2175f 2
sebig 1:17772f9c7412 3 DigitalOut myled1(LED1);
sebig 0:211a15a2175f 4 DigitalOut myled2(LED2);
sebig 0:211a15a2175f 5
sebig 1:17772f9c7412 6 int main()
sebig 1:17772f9c7412 7 {
sebig 0:211a15a2175f 8 while(1) {
sebig 1:17772f9c7412 9 myled1 = 1; // LED1 is ON
sebig 0:211a15a2175f 10 myled2 = 0; // LED2 is OFF
sebig 1:17772f9c7412 11 wait(1); // 200 ms
sebig 1:17772f9c7412 12 myled1 = 0; // LED1 is OFF
sebig 0:211a15a2175f 13 myled2 = 1; // LED2 is ON
sebig 1:17772f9c7412 14 wait(1); // 200ms
sebig 0:211a15a2175f 15 }
sebig 0:211a15a2175f 16 }