Setting Up The NodeMCU with the Arduino IDE


First, you're going to need to acquire the Arduino IDE. In my experience, version >1.9.0 of the IDE works best. As of right now, this version is in Beta, and can be downloaded from:


  1. Open the IDE and go to File -> Preferences
  2. Under Additional Board Managers, enter the following:,
  3. Press OK
  4. Go to Tools -> Board -> Boards Manager and type in ESP8266. A single board should appear. Install it.
  5. Once it's finished, go to Tools -> Board and select NodeMCU v1.0 (ESP12-E Module)
  6. Now select the correct Port. This will be different on every machine.

Test Sketch

To test your setup, run this quick little sketch:

unsigned long lastTickMillis = 0;
int tickState = 0;

void setup() {

void loop() {
    unsigned long currentMillis = millis();
    if(currentMillis - lastTickMillis >= 1000){
        if(tickState == 0){
            tickState = 1;
            tickState = 0;
        lastTickMillis = currentMillis;

Upload this sketch to the NodeMCU, then open up the Serial Monitor with Tools -> Serial Monitor. Once it finishes uploading, you should see the output of the program.

That's about it! That should get you started.