The Wemos 0.66 inch OLED Shield is a small OLED display that can be used with the Wemos D1 Mini. The display has a resolution of 64x48 pixels and is controlled by the SSD1306 driver. The display is connected to the I2C bus of the Wemos D1 Mini. The display can be used to show text, images, and graphics. The display is equipped with a push button that can be used to interact with the display. The display can be used to show sensor data, status information, or as a user interface for a project.
Example Code
Install the libraries using the Arduino Library Manager. The libraries are:
Adafruit GFX Library
Adafruit SSD1306 Library Wemos Mini OLED
DANGER
Do not install the
Adafruit SSD1306
library, it will not work with the Wemos Mini OLED. Having both libraries installed will cause weird errors. So be sure to only have theAdafruit SSD1306 Wemos Mini OLED
installed.
higher or equal to v2.1.0:
Make sure to install the correct library to interact with the buttons: https://github.com/wemos/LOLIN_OLED_I2C_Button_Library
This library has some unfortunate name clashes with the new motor library named LOLIN_I2C_MOTOR.h
The problem is that both libraries export an enumaration type with identical names. Proper use of namespaces, careful export of names or using better names would have prevented this problem. If you need to combine those libraries the only option is to update at least one of them to solve the problem. Moving the enumeration type from the header file to the corresponding implementation appears to be an easy solution.
lower than v2.1.0
To interact with the buttons, just use GPIO (digitalRead, and don’t forget to set them to input). D3=Key A, D4=Key B