NodeMCU Basic Project-Blink A LED - Instructables
NodeMCU Basic Project-Blink A LED - Instructables
In this lesson,we will introduce how to blink the on-board LED and how to blink a external LED.
Hardware Preparation:
NodeMCU x 1
LED x 1
PC x 1
https://www.instructables.com/NodeMCU-Basic-Project-Blink-a-LED/ 1/3
7/15/24, 10:41 PM NodeMCU Basic Project-Blink a LED - Instructables
In this part,we will learn how to use the Arduino IDE to blink the on-board LED,the blue led in the boar
d was used to signal the execution of a particular procedure.Because the GPIO16 (DO) limitation to us
e the analogWrite() and looking to see my LED doing something else…
First,connect the NodeMCU to the PC,put below code to the Arduino IDE:
Then config the board settings(choose the corresponding board and port for your NodeMCU) and uplo
ad the sketch to the board.
After upload done,you will see the on-board LED blink every second.
https://www.instructables.com/NodeMCU-Basic-Project-Blink-a-LED/ 2/3
7/15/24, 10:41 PM NodeMCU Basic Project-Blink a LED - Instructables
Connect one end of the resistor to the digital pin correspondent to the LED_BUILTIN constant.
Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor.
Connect the short leg of the LED (the negative leg, called the cathode) to the GND. In the diagram we
show a NodeMCU that has D1 as the LED_BUILTIN value.
The value of the resistor in series with the LED may be of a different value than 200 ohm; the LED will
lit up also with values up to 1K ohm.
https://www.instructables.com/NodeMCU-Basic-Project-Blink-a-LED/ 3/3