OLED Display

Materials

  • AMB82-mini x 1

  • 0.96 inch OLED Display 128x64 (SSD1306) x 1

Example

Introduction

The example will showcase texts, shapes, and bitmap images on an OLED display using the I2C communication protocol alongside Adafruit libraries.

Procedure

Connect the 0.96-inch OLED display to I2C_SDA and I2C_SCL of the board.

../../../_images/image0132.png

Open the example in “File” -> “Examples” -> “AmebaWire” -> “OLED_SSD1306”.

../../../_images/image0232.png

For this example, we will be using 0x3D as the address.

../../../_images/image0329.png

If the address doesn’t work for you, you can run I2CScanner to find the OLED address by navigating to “File” -> “Examples” -> “AmebaWire” -> “I2CScanner”.

../../../_images/image0413.png

Compile and upload to Ameba, then press the reset button.

First, Realtek logo will be shown, followed by shapes, text, and animations. Some examples are shown below.

../../../_images/image057.png
../../../_images/image064.png
../../../_images/image074.png

If you would like to change the Bitmap image shown on the OLED display, you can prepare a picture/photo and resize the image based on the OLED display that you are using. You can look for a photo resizing tool online, for example, https://resizeimage.net/.

Next, you may use online tools such as https://javl.github.io/image2cpp/ to convert image into an array.

Code Reference

[1] Adafruit_SSD1306 library and example obtained from:
[2] Adafruit_GFX library obtained from: