Basic example showing how to blink the LED present on the board.

Dependencies:   mbed

Committer:
arostm
Date:
Wed Jun 07 09:24:48 2017 +0200
Revision:
1:cdac3355cada
Parent:
0:455505e7e985
Adding new mbed library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:455505e7e985 1 #include "mbed.h"
bcostm 0:455505e7e985 2
bcostm 0:455505e7e985 3 DigitalOut myled(LED1);
bcostm 0:455505e7e985 4
bcostm 0:455505e7e985 5 int main() {
bcostm 0:455505e7e985 6 while(1) {
bcostm 0:455505e7e985 7 myled = 1; // LED is ON
bcostm 0:455505e7e985 8 wait(0.2); // 200 ms
bcostm 0:455505e7e985 9 myled = 0; // LED is OFF
bcostm 0:455505e7e985 10 wait(1.0); // 1 sec
bcostm 0:455505e7e985 11 }
bcostm 0:455505e7e985 12 }