NederlandsKlik deze knop voor de Nederlandstalige website

WEMOS D1 Esp-Wroom-02 and Arduino IDE

The “WEMOS D1 Esp-Wroom-02” that I got from VNG Systems is another microcontroller development board with an ESP8266 WiFi chip. This board also has an OLED screen, 18650 battery charging circuit and a directional button built-in. This makes the board an excellent option for mobile applications. And like all the other ESP8266 based boards, this one can be programmed with the familar Arduino IDE.

Wemos D1 ESP-Wroom-02 and Arduino IDE: VNG systems unboxing
Wemos D1 ESP-Wroom-02 and Arduino IDE: VNG systems unboxing

WEMOS D1 Esp-Wroom-02 features

First, let’s take a closer look at the board itself. The black circuit board comes with a 10 pin header that you can solder onto it, if needed. The back of the board has a battery holder that supports flat top 18650 batteries. Other characteristics of the board are:

  • Board size: 102x30x20mm
  • Voltage Input range: 5V-12V
  • Micro USB connection
  • Charge Current: 500 mA
  • Battery overcharging and overdischarging protection circuit

I found that the information about the board published online usually is incorrect.. For instance, the name  of the board implies that it is fitted with the ESP-WROOM-02 WiFi chip. Instead, it has an ESP-12E/F module. Also, most of the sites mention the wrong OLED-libraries and GPIO pinouts. So below I will write about my own findings and experiences.

ESP-Wroom-02 ESP8266+0,96inch OLED+18650 Batterijhouder
Tested and recommended by OneGuyOneBlog.com:

ESP-Wroom-02 ESP8266+0,96inch OLED+18650 Batterijhouder

Inputs and outputs

On the board there are the following inputs and outputs available:

  • 1 Analog input AD (A0)
  • 5 Digital inputs/outputs with interrupt/PWM/I2C/one-wire support D3 (GPIO0), D4 (GPIO2), D8 (GPIO15), D9 (GPIO3), D10 (GPIO1)

Built-in LEDs

The description states that the board has one programmable LED, on pin D0. But I found that the board has 2 programmable LEDs. One is the blue LED on the ESP8266 module, the other one is an additional green led on the breakout board.

  • Programmable blue LED on GPIO2 (LED_BUILTIN)
  • Programmable green LED on GPIO16

OLED screen

The built-in OLED screen has the following specifications:

  • Controller: SSD1306
  • Resolution: 128 x 64 pixels, size: 0.96 Inch, color: White
  • I2C (GPIO5: SDA; GPIO4: SCL)
  • Address: 0x3C

It can be used with the ThingPulse ESP8266 OLED SSD1306 library.

Directional button

The board has a built-in directional button which supports 5 functions:

  • Up (GPIO13), Down (GPIO12)
  • Left (RESET) , Right (GPIO0)
  • Push (GPIO14)

Unfortunately, the left direction contact of the button is hardwired to the RESET pin of the ESP8266, so this can not be changed without modifying the board.

GPIO summary

Summarizing, I found the GPIOs of the ESP are wired as follows:

GPIOFunction
0D3 / Button right
1D10
2D4 / LED blue (LED_BUILTIN)
3D9
4OLED SCL
5OLED SDA
12Button down
13Button up
14Button push
15D8
16LED green
A0AD (ADC)

18650 Battery holder

The battery holder supports a single flat top 18650 cell. The charging circuit will protect your battery from overcharging and also overdischarging. Warning: the circuit does not have reversed polarity protection. So be aware to insert the battery the right way. If you insert it reversed, then your board will be damaged. The polarity is indicated by a + and – printed on the board. The charging circuit has two LED indicators: the red LED indicates charging, the green LED means the cell is fully charged. When you upload a sketch to the ESP-Wroom-02, you have to remove the battry first, and set the power switch to the “ON” position.

Using the Esp-Wroom-02 with the Arduino IDE

First, you need to have the Arduino IDE installed on your computer. For Windows 10 users, check out the blog post “Installing the Arduino IDE on Windows 10” on how to do that. Linux users should see the blog post “Install or upgrade to the latest Arduino IDE on Linux“.

Second, you need to have the “Arduino core for ESP8266 WiFi chip” installed in your Arduino IDE.  See the section “Installing the ESP8266 Arduino core” in the blog post “ESP8266 NodeMcu and Arduino IDE on Linux“. This procedure is the same for both Windows and Linux.

Third, select an appropriate ESP8266-based board in de Arduino IDE. For me, the selection “WeMos D1 R1” worked fine. See the picture below for the settings that I used.

Wemos D1 ESP-Wroom-02 and Arduino IDE: Board settings
Wemos D1 ESP-Wroom-02 and Arduino IDE: Board settings

Fourth, you need to install the OLED library. You can download the ThingPulse ESP8266 OLED SSD1306 library directly from GitHub or install it using the Arduino IDE library manager. See the image below.

Wemos D1 ESP-Wroom-02 and Arduino IDE: OLED library
Wemos D1 ESP-Wroom-02 and Arduino IDE: OLED library

Finally, you can test your Esp-Wroom-02 board with the demo sketch below. When the button is pressed, the OLED screen will show the direction of the button. It also displays the value of the analog input, It will change when you touch it with your finger.

VNG Systems

ESP-Wroom-02 ESP8266+0,96inch OLED+18650 Batterijhouder
Tested and recommended by OneGuyOneBlog.com:

ESP-Wroom-02 ESP8266+0,96inch OLED+18650 Batterijhouder

Add a Comment

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