BLINK

Dependencies:   mbed

Committer:
pathae
Date:
Tue Jan 28 10:35:45 2020 +0000
Revision:
0:62e874e09c56
BLINK

Who changed what in which revision?

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