Acoptex.Com

Learn ESP32, ESP8266, Arduino, and Raspberry Pi

Installing the ESP8266 NodeMCU Board in Arduino IDE 2.0 (Windows, Mac OS X, Linux)

We will learn how to install the ESP8266 NodeMCU Board in Arduino IDE 2.0 whether you’re using Windows, Mac OS X or Linux. More ESP8266 projects you can find here.

Tag: Project 139a Installing the ESP8266 NodeMCU Board in Arduino IDE 2.0 (Windows, Mac OS X, Linux)

Project resources

  • Libraries used: None
  • Code: sketch

1. ESP8266 ESP-12E module and Micro USB cable 1pc

ESP8266 ESP-12E (nodemcu)

2.Arduino IDE 2.0 ( you can download it from here  )

Understanding the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)

You can read more about it here.

Understanding the Arduino IDE 2.0

The Arduino IDE is the well-known software we all use to program our boards. Its development started in 2005 based on the graphical interface of the Processing project and has never stopped since. During these years, countless hours of development by the Arduino team with the help of a vibrant community made the Arduino IDE the de facto standard for electronics prototyping. While the Arduino IDE provides a simple and clear interface that is ideal for the novice users, the more advanced users often report that the editing capabilities are a bit limited compared to modern editors.

On the 1st of March 2021, Arduino team has announced that the Arduino IDE 2.0 beta is available for downloading and its code repositories became open source. It carries a modern editor and provides a better overall user experience thanks to a responsive interface and faster compilation time. There are a lot of improvemets made, for example: while typing, the editor suggests the autocompletion of variables and functions according to the libraries you included; when right-clicking on a variable or a function, a contextual menu will provide navigation shortcuts to jump to the line (and file) where they are declared and much more. There’s another big feature in the new IDE: a live debugger that allows you to run your code interactively on a board and inspect its execution without writing tens of “Serial.println()” statements. Just fire the debug panel, set breakpoints where you want to pause the execution and inspect the content of variables. You can even change the content of variables on the fly and resume execution. The debugger supports all the Arduino boards based on the SAMD and Mbed platforms (MKR family, Nano 33 IoT, Nano 33 BLE, Portenta, Zero). Maintainers of Arduino cores for third-party boards can add support for debugging by adding the relevant configuration parameters; a technical guide for this is coming. You’ll need to connect a debugging probe such as the Segger J-link to the JTAG pins on the board and you’ll be ready to go. The new IDE is based on the Eclipse Theia framework, which is an open source project based on the same architecture as VS Code (language server protocol, extensions, debugger). The front-end is written in TypeScript, while most of the backend is written in Golang.

Signals and connections of the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)

ESP-12E pinout
  • TX – transmit pin. GPIO pin
  • RX  – receive pin.  GPIO pin
  • 3V3 (or 3V or 3.3V)- power supply pin (3-3.6V). 
  • GND ( or G) – ground pin.
  • RST – reset pin. Keep it on high (3.3V) for normal operation. Put it on 0V to reset the chip.
  • EN – Chip enable. Keep it on high (3.3V) for normal operation.
  • Vin – External power supply 5VDC.
  • D0-D8 – GPIO (General Purpose Input Output) pins 
  • D5-D8 – SPI interface
  • D1-D2– I²C/TWI Interface
  • SC (or CMD) – (Chip Select) – the pin that the master can use to enable and disable specific devices. GPIO pin
  • SO (or SDO) – Master In Slave Out (MISO) – SPI communication. The Slave line for sending data to the master. GPIO pin
  • SK (or CLK) – SCK (Serial Clock) – SPI communication.The clock pulses which synchronize data transmission generated by the master. GPIO pin
  • S1 (or SD1) – Master Out/Slave In (MOSI). SPI communication. The Master line for sending data to the peripherals. GPIO pin
  • S2 (or SD2) – GPIO pin
  • S3 (or SD3) – GPIO pin
  • VU (or VUSB) – external power 5VDC.
  • A0 – ADC output.
  • RSV – reserved

Step by Step instruction

Before starting this installation procedure, make sure you have the 2.0 beta version of the Arduino IDE installed in your computer. We use Arduino IDE 2.0 beta and Windows 7 64 bit OS.

1. Preparations

Go to the Arduino website and download the version for your operating system. It’s very easy to install it, just follow the installation instructions. If you have any trouble with installation, then go to the Arduino installation guide.

Arduino IDE 2.0 beta webpage
  • Windows: run the file downloaded and follow the instructions in the installation guide.
  • Mac OS X: copy the downloaded file into your application folder.
  • Linux: extract the downloaded file, and open the arduino-ide file that will launch the IDE.
Arduino IDE 2.0 beta INSTALLATION DONE

2. Installation of  ESP8266 add-on

1.Open Arduino IDE 2.0 beta. 

2.Go to File -> Preferences.

Arduino IDE 2.0 beta

3.Type http://arduino.esp8266.com/stable/package_esp8266com_index.json  to the Additional Board Manager URLs field. Then press OK button. If you already have the ESP8266 boards URL, you can separate the URLs with a comma as follows: https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json

Arduino IDE 2.0 beta

4.Open Boards manager. Go to Tools -> Board -> Boards Manager… or you can simply click on Boards Manager icon at the left-side corner.

Arduino IDE 2.0 beta
Arduino IDE 2.0 beta
Arduino IDE 2.0 beta

5.Look for esp8266 or scroll down to the esp8266 by ESP8266 Community entry. Select the esp8266 by ESP8266 Community entry. When you click it an install option will appear. Press Install button to start installation.

Arduino IDE 2.0 beta
Arduino IDE 2.0 beta

6.Congrats!!!You have installed it successfully. Let’s test it now.

3. Testing installation

1.Plug the ESP8266 NodeMCU Board to your PC and wait for the drivers to install (or install manually any that might be required).

2.Open Arduino IDE 2.0. 

3.In order to test the ESP8266 add-on installation installation, we’ll upload a simple code that blinks the on-board LED (GPIO 2) – sketch.

4.Select COM port that the board is attached to (if you don’t see the COM Port in your Arduino IDE, you need to install the ESP32 CP210x USB to UART Bridge VCP Drivers)

Arduino IDE 2.0 beta

5.On the top drop-down menu, select the “unknown” board. A new window, as shown below, will open. Or go to Tools -> Board -> ESP8266 Arduino -> and select your ESP8266 Board (We have the NodeMCU 1.0 board) and click on OK button.

Arduino IDE 2.0 beta

6.Compile and upload the sketch to your ESP8266 NodeMCU board. Click on Upload button. If everything went as expected after a few seconds, the upload should be complete and you see a “Upload complete” message.

upload button
Upload completed to ESP8266

7.The ESP8266 on-board LED should be blinking every second.

ESP8266 ESP-12E with Arduino IDE 2.0 beta

8.Click on Serial Monitor icon to open the Serial Monitor tab.

Arduino IDE 2.0 beta
Arduino IDE 2.0 beta

9.That’s it! You’ve installed the ESP8266 Boards successfully in Arduino IDE 2.0.

Summary

We have learnt how to install the ESP8266 NodeMCU Board in Arduino IDE 2.0 whether you’re using Windows, Mac OS X or Linux.

Check for more DIY projects on Acoptex.lt and Acoptex.com!

If you are looking for high quality PCBs PCBWay is the best choice: