fbpixel
Tags: , ,

A large number of microcontrollers such as NodeMCU ESP8266 can be programmed with the Arduino IDE. Arduino boards are powerful and very practical for learning and carrying out projects, with an extremely large mutual aid community. However, there are other microcontrollers (For example: NodeMCU, Feather of Adafruit or ArduCam ESP32S etc.) some very powerful, others very specific or even very connected, which you might have to use because you have a specific need or because you prefer their use.

The way to configure the Arduino IDE is similar between these different cards. We will see in this article the procedure to configure and program these microcontrollers.

This tutorial can be used for any ESP8266 microcontroller. In particular, the following microcontrollers:

  • NodeMCU ESP8266 V2 Amica
  • NodeMCU ESP8266 V3 Lolin
  • Wemos D1 Mini
wemos-nodemcu-esp8266-v2-v3 Program a NodeMCU ESP8266 with Arduino IDE

Installing the Arduino IDE

To program the ESP8266 NodeMCU, we’re going to install the Arduino IDE. When installing the software, some drivers should install automatically. If this is not the case, follow the next paragraph.

For Linux users, you can follow this link to install Arduino on Linux

Install drivers

Typically, a new device installs its drivers the first time you connect. When this is not the case, as with the NodeMCU, the device may not be recognized. In this case, there are two methods to obtain the drivers. The first is to find and download them from the internet (NodeMCU drivers or for Linux users).

The second is to use the device manager. The microcontrollers connected to the computer can be found under the “Ports (COM and LPT)” tab.

device-manager-usb Program a NodeMCU ESP8266 with Arduino IDE

Double-click on the device, the poster properties window. Under the “Driver” tab, you will find the option to “update” the driver.

device-manager-driver Program a NodeMCU ESP8266 with Arduino IDE

Select the “Automatically search for driver” option.

device-manager-update-driver-opt Program a NodeMCU ESP8266 with Arduino IDE

Once the driver is installed, it will be possible to communicate with the device.

Add JSON handlers

To be able to program other microcontrollers with the Arduino IDE, he must know their configurations. It is possible to install on the Arduino card managers containing all the tools necessary for their programming. To retrieve the managers, you must find the corresponding URL. In the case of NodeMCU, http://http://arduino.esp8266.com/stable/package_esp8266com_index.json

If you encounter compilation problems, check if a previous version of esp8266 is installed. If this is the case, delete it manually (C:\Users\<USERNAME>\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266).

Then open the File>Preferences window in the Arduino software. At the bottom of the page you will find a text box in which to enter the URL: “Additional card manager URL”. (don’t forget to separate the URLs with a comma “,”)

add-board-arduino-ide Program a NodeMCU ESP8266 with Arduino IDE

Install managers

Under the “Tools” tab, follow the path “Card type> Card manager”. The IDE will load the map catalog from the URL.

arduino-ide-board-manager Program a NodeMCU ESP8266 with Arduino IDE

If you are looking for the microcontroller in the search bar, the package to install should appear.

arduino-ide-board-manager-search Program a NodeMCU ESP8266 with Arduino IDE

Select the configuration

Once the management package is installed, the microcontroller should appear in the choices of Card type available.

arduino-ide-board-configuration Program a NodeMCU ESP8266 with Arduino IDE

You will then need to know the characteristics of your card to select the correct parameters. However, except in exceptional cases, the default settings will work without problems.

Find other examples and tutorials in our Automatic code generator
Code Architect