This is a simple project on mbed, developed by NPNLab team The led is turned on for 1s and off for 1s then, repeated.

Dependencies:   mbed

Committer:
KISIDO85
Date:
Fri Jun 23 06:09:11 2017 +0000
Revision:
0:50ed51be7a14
This is a simple project on ST32 Nucleo Board.; The led is turned on and off every 1s.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
KISIDO85 0:50ed51be7a14 1 #include "mbed.h"
KISIDO85 0:50ed51be7a14 2
KISIDO85 0:50ed51be7a14 3 DigitalOut myled(LED1);
KISIDO85 0:50ed51be7a14 4
KISIDO85 0:50ed51be7a14 5 int main() {
KISIDO85 0:50ed51be7a14 6 while(1) {
KISIDO85 0:50ed51be7a14 7 myled = 1; // LED is ON
KISIDO85 0:50ed51be7a14 8 wait(1); // 2 s
KISIDO85 0:50ed51be7a14 9 myled = 0; // LED is OFF
KISIDO85 0:50ed51be7a14 10 wait(1); // 2 s
KISIDO85 0:50ed51be7a14 11 }
KISIDO85 0:50ed51be7a14 12 }