Check connectivity to your Node MCU.
This video will make the onboard LED blink. There is no need for any connected pins.
It is provided as a bare minimum example to check if everything is connected and installed correctly on your board.
Add the NodeMCU board
Add the following URL to “Arduino: Additional URLS” setting in VSCode.
https://arduino.esp8266.com/stable/package_esp8266com_index.json
CTRL+,
. That is control key + comma key.- Search for:
arduino url
- Paste the above URL. If you have multiple URLs, separate them with a comma.
The first sketch.
With the NodeMCU connected to your computer through USB, you can connect to it with VSCode.
The same code for the Arduino can be used for the NodeMCU.
#include <Arduino.h>
const auto pin = LED_BUILTIN;
void setup()
{
pinMode(pin, OUTPUT);
}
void loop()
{
digitalWrite(pin, HIGH);
delay(500);
digitalWrite(pin, LOW);
delay(1000);
}
Make sure to select the correct COM-port when uploading the program.
See Also
- - Arduino init
- - Software
- - The setup
- - compile_commands.json with CMake
- - Why do programmers need private offices with doors?
Comments
Any comments? Create a new discussion on GitHub.There used to be an inline comment form here, but it was removed.