How to Use 0.96-Inch OLED Display Module

Photo of 0.96-inch OLED display module

It's a 0.96-inch OLED display. It can be used for displaying text, images, and even as a game screen.

About the Module

Photo explaining the display position of the 0.96-inch OLED display module

You can display characters and images on the display located in the red circle in the photo. SPACEBLOCK communicates via I2C using two signal lines, SDA and SCL.
※Text display supports numbers, alphabets, and symbols. (Japanese support is planned for an update)

About I2C

In I2C communication, communication is carried out using two signal lines, SDA (Serial Data) and SCL (Serial Clock). SDA is the data signal line, and SCL is the clock signal line.

Specifications

Voltage3~5V
Communication MethodI2C
Display ColorBlue
Pixel Count128x64
Screen Size0.96 inches
Size 27 x 27 (mm)

Connection

Direct Connection to SPACEBLOCK Microcontroller Board

Insert the pins of the 0.96-inch OLED display module into the yellow pin sockets of the SPACEBLOCK microcontroller board as shown in the photo.

Photo of the 0.96-inch OLED display module

Connection Using Jumper Wires

pageHowtoHardwareSBPOLED096>items>setupText2

  • Connect the SCL pin of the 0.96-inch OLED display module to the I2C compatible pin of SPACEBLOCK
  • Connect the SDA pin of the 0.96-inch OLED display module to the I2C compatible pin of SPACEBLOCK
  • Connect the GND pin of the 0.96-inch OLED display module to the GND pin of SPACEBLOCK
  • Connect the VCC pin of the 0.96-inch OLED display module to the 5V pin of SPACEBLOCK
Connection method between SPACEBLOCK microcontroller board and 0.96-inch OLED display module

※The image shows the signal lines connected to pins B1 and B3. I2C compatible pins are combinations of B1 and B3, or B0 and B2.

※5V and GND can also be inserted into the pins with the same notation on the SPACEBLOCK microcontroller board.

Usage

You can draw images and text on the 0.96-inch OLED display module using blocks in the 'Output' category of the project.

When using OLED, place the following initialization block first:

Block to initialize the 0.96-inch OLED display module

After that, you can use blocks for drawing characters and simple shapes. For displaying sensor values, refer to the following image:

Sample display of SPACEBLOCK microcontroller board and 0.96-inch OLED display module

When creating games or animations, you need to reset the screen and update the display collectively. The arrangement is as follows:

1. Place the "Reset display" block at the beginning of the loop
2. Set the display timing of the drawing in the process to "Later"
3. Place the "Apply later changes to display" block at the end of the loop
※For more details, refer to the following image.

Sample of collective display of 0.96-inch OLED display module

For detailed usage of the blocks, click here

Writing ~ to OLED