Egyszerű LED villogtatás NUCLEO-F446RE kártyán (MBED2)

Dependencies:   mbed

Committer:
cspista
Date:
Tue Sep 21 13:45:12 2021 +0000
Revision:
2:335d3650f00e
Parent:
0:bf9e6380ebf9
LED blinking

Who changed what in which revision?

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