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 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.
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)
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
The built-in OLED screen has the following specifications:
Resolution: 128 x 64 pixels, size: 0.96 Inch, color: White
The board has a built-in directional button which supports 5 functions:
Up (GPIO13), Down (GPIO12)
Left (RESET) , Right (GPIO0)
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.
Summarizing, I found the GPIOs of the ESP are wired as follows:
D3 / Button right
D4 / LED blue (LED_BUILTIN)
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.
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.
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.
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.