ESP8266 Development Boards Programming with Arduino IDE

The NodeMCU and Wemos D1 R2/mini are development boards featuring the popular ESP8266 WiFi chip. As it seems, you can program the ESP8266 just like any other microcontroller. Its obvious advantage over the Arduino or PIC is that it can readily connect to the Internet via WiFi. However, the ESP8266 Wi-Fi board has restricted pins although the chip itself encompasses a heap of output ports. The NodeMCU solves this drawback by including ten GPIO pins which are capable of generating PWM, I2C and 1-wire interface. This ESP8266 development board extremely looks like an Arduino Nano. As an Arduino, another advantage of this board is that you can connect it directly to your PC or Mac and program it! In fact, that is what I am going to show you in this tutorial. Cross your finger and let’s move on.

Step 1: Insert your ESP8266 NodeMCU/Wemos to your computer USB port

You need a USB port micro B cable to connect the board. The blue LED on the board start flashing after you plugged the board to the USB port. At this moment, the device driver for your board would have been installed. If your computer is not able to detect the board, you may need to download and install the driver from this page.

Step 2: Launch the Arduino IDE

Download and install the latest Arduino IDE from their official page If you already have the IDE installed, check that your version is at least 1.6.4 to proceed with this. Click to File > then Preferences. The preferences window will and in the “Additional Boards Manager URLs” field, type (or copy-paste) this link ” “. without the quotes. Click OK to close the window. check the diagram below.

Arduino IDE settings: Click to enlarge

Then click on Tools > Board > Board Manager. Scroll down to the “esp8266 by ESP8266 Community” entry. Click that entry and look for the install button on the lower right. Click on install and wait for it to complete. Congratulation! you now have the ESP core board library installed and integrated into the Arduino IDE. Well, you can start tinkering with your Wi-Fi board.

Step 3: Test your ESP8266 Wi-Fi Board, Make an LED blink.

Let’s test our ESP Wi-Fi board by using it to blink an LED connected to one of the digital pins. But before that, you need to know that there is a slight mismatch of the pin names printed on the board and the pin names we’ll be using for our program. I am using NodeMCU V1.0. See the pinout below

NodeMCU pinout: Click to enlarge

In this tutorial, I connected the LED to D7 as printed on the NodeMCU Esp8266 board. D7 represents GPIO13 as can be seen from the image above. The code as shown below is basically the Blink sketch from the Arduino example:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second

Type or copy the code above to the Arduino IDE text editor pane. upload button. If all is well the “Done Uploading” text will the IDE text editor.

Bingo! here you are, it works!

Even though I used the nodeMCU for this tutorial, the Wemos d1 mini, and the Arduino wifi

Exit mobile version