NodeMCU with VSCode

- February 27, 2023

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

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

Comments

Any comments? Create a new discussion on GitHub.
There used to be an inline comment form here, but it was removed.