NodeMCU ESP8266 with Arduino IDE

I wanted to be able to program the ESP8266 based NodeMCU board with the Arduino IDE. This is how I setup the environment and had the NodeMCU blinking.

NodeMCU Blink Arduino IDE
NodeMCU Blink Arduino IDE
Installing NodeMCU Board
  1. Install latest version of Arduino IDE
  2. Add the Esp8266 board manager. Here is a list of all the unofficial board managers that can be used with Arduino IDE.
    1. Start Arduino and open Preferences
    2. Look for “Additional Board Managers” field and enter <code>http://arduino.esp8266.com/stable/package_esp8266com_index.json</code>
    3. Open Tools>Boards>Board Manager
    4. Choose “esp8266 by Esp8266 Community” and install. Its about 160 MB install.
ESP8266 Arduino Board Manager Install
ESP8266 Arduino Board Manager Install

After Installation these are the boards I could see in Boards menu under ESP8266:

ESP8266 modules in Arduino IDE
ESP8266 modules in Arduino IDE

You should now be able to connect your NodeMCU to the PC and verify. Be aware of two things:

a) You might have to install the Silicon Labs CP210x Serial Driver if you can not see any COM Port listed on the Ardunio> Tools> Ports menu

b) It might a silly thing. But make sure you use the right USB cable. There are too many USB cables in my toolbox. Once in my ignorance about USB cables I used a power only USB charging cable (one that has only the two wires for power connected and no data wires) and struggled a while on COM port not appearing.

 NodeMCU Blink

Once the Port appears in the Arduino IDE menu, choose the right board. In my case its NodeMCU 0.9 board.

Choose File>Examples>ESP8266>Blink sketch. Press Upload. The blue led on the ESP8266 should blink rapidly indicating communication status. Once sketch is successfully uploaded I could see the on board red LED connected to GPIO 16 blink  (D0 on the board).. Pin out below.

NodeMCU Pinout
NodeMCU Pinout

Now that my Arduino IDE is setup to be used for NodeMCU programming, time to explore further.

2 thoughts on “NodeMCU ESP8266 with Arduino IDE”

  1. Hello, i just read your tutorial of a simple blinking led. I bought the same bouard (NodeMCU v0.9) but when i try to upload a program using arduino IDE, it just broke. I open the serial monitor and i see just garbage and anything else.

    Do you configure anything else? Or there is an extra configuration?

    Your experience will be helpful.

    Best regards

Leave a Reply

Your email address will not be published. Required fields are marked *