#Test: shield OLED for Wemos D1 Mini (SSD1306 64×48 pixels) review with ESP Easy and Adafruit_SSD1306

Today, I propose to test the OLED shield for the Wemos D1 Mini. This shield is equipped with an OLED screen of 64 x 48 pixels. It uses the usual SSD1306 microcontroller already presented in several articles. It is a small screen size ideal for adding a miniature display to the Wemos. It is very easily found direct from China less than €5.

Unpacking the OLED shield for Wemos D1 Mini

I was surprised by the quality of the packaging. The screen is delivered in a small transparent case. The shield comes with the usual 3-dimensional pin set. The OLED screen is directly soldered to the PCB. The manufacturing quality is impeccable. Small small weak point to note however, the screen is held in place by a self-adhesive foam. The screen can be turned slightly. It may have been positioned at the time of bonding, or the foam deforms during storage. It’s not very annoying, just take it off gently and reposition it properly.

shield wemos d1 mini oled display 64x48 pixels

Arduino code with the modified Adafruit_SSD1306 library

The Adafruit_SSD1306 library is quite simple and very powerful. It allows you to draw simple shapes, write text, display bitmaps, write text and make small animations (scrolling …). The resolution of this screen is not supported directly by this library. Mike Causer made an adaptation of the bookstore. It is available on Github here. Mc Causer also made an adaptation of the Adraduit demo program here.

If you are developing other projects using the official Adafruit_SSD1306 library, it is best to add the 2 modified files directly to your project. Download the ZIP file from Github. After decompression, place the 2 files Adafruit_SSD1306.cpp and Adafruit_SSD1306.h in the directory of your project. Close and reload the project to take into account the 2 libraries

To learn more about this bookstore, read this article

You must modify the declaration of the library at the beginning of the program to call the local library. This is especially the case if you already use the Adafruit official library for other projects.


Note that if the library is not in the same directory as the Arduino program, it will also be necessary to specify the path. 

The change simply takes into account the resolution of the shield’s OLED screen. The programming remains exactly the same. Here is a small (minimal) code example that displays a Hello World on the first line of the screen.

DHT22 tester: temperature and humidity display

To test the screen, here is a small quick assembly which allows to measure and then to display the temperature and the humidity measured with the shield DHT22. The Shield Wemos DHT22 has already been presented in this test. You can make this small temperature probe autonomous by running it on battery thanks to Shield LiPo which will be the subject of a test.

esp8266 Wemos D1 mini ESP8266 Wemos D1 Mini board

From €2,90€ to €4,90€

wemos d1 mini shield batterie lipo LiPo battery charger with micro USB connector.

About €2,20

wemos d1 mini oled shield I2C SSD1306 monochrome OLED Display 64×48 pixels.

About €4,40

wemos d1 mini dht22 shield DHT22: temperature / humidity sensor.

About €6,40

Program code

This small program thus recovers the temperature measurement (in Celcius) as well as the moisture content.

The OLED shield can display up to 6 lines of text. With the Adafruit_SSD1306 library, there are 10 characters with size 1.

shield wemos dht22 oled display 64x48pixels battery lipo arduino code

Using the Shield OLED with ESP Easy

The Wemos shield is only supported from the R147 RC8 version of ESP Easy. Click on this link to download it or go to letscontrolit.com to retrieve a newer version. Install the ESP Easy firmware as usual.

Run a scan of the I2C bus for the address of the screen.

shield oled wemos d1 mini espeasy 64x48 scan bus i2c

Create a device for the DHT22. Compared to the R120 version, the pins have a double marking. The Arduino GPIOx tagging and ESP8266 (Dx) matching. On the DHT shield, the DHT22 (or DHT11) is welded to the D4 pin. Configure the settings like this:

  • Delay: Choose a refresh rate. Here 1 second
  • IDX: a number other than 0
  • GPIO: the DHT22 is connected to the D4
  • Type: choose your model (DHT11, DHT21 or DHT22)
  • Register with submit

shield oled wemos d1 mini espeasy dht22 shield

Add a new device for the OLED screen and configure it

  • Delay: 1 second for example
  • I2C: choose the I2C address on which the screen is located
  • Rotation: If you only have 4 lines to display, you can change the orientation. Version 147 RC8 has a display bug that does not display the last 2 lines
  • Display Size: choose 64×48
  • Line: The value of a probe in brackets is called. For example, to display the temperature returned by the DHT22 device, [DHT22 # temperature] will be done. The case is not considered.
  • Register with submit

Other remarks:

  • The code has a second bug. The last line overflows on the first line (or more)
  • Each line can not contain more than 8 characters. This is less than with the Adafruit_SSD1306 library

shield oled wemos d1 mini esp easy

And here is the display

shield wemos dht22 oled display 64x48pixels battery lipo esp easy r147

Wemos nos proposes here a Shield of good quality which comes to be stacked on top of other Shields. The resolution is a bit constraining but the usual libraries have been adapted and allow to program quite simply a display.

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.


  • thecuri

    could you please update the links to the modified OLED libraries?

  • Adafruit library was rather slow when displaying plain text on SSD1306 128×64 via I2C (and they still hasn’t fixed the hard-coded mode which forces you to modify the library source for your needs), so I’d vote for another one which is also free – SSD1306Ascii (it is small and fast enough).