How to use SSD1306 I2C OLED display and NUCLEO-L053R8 board

If you like it, share it


  • Use FIREFOX or CHROME for a clear view of the images present in this web site
  • For enlarge the image press: CTRL +
    For reduce the image press: CTRL –


SSD1306I2C Oled Display is available on different internet store, see for example here and here.

The Datasheet is here.

We developed a simple test program using the NUCLEO-L053R8 and SSD1306.
The schematic is below.

How to get the SW for this project

Please send us an email and ask us the password for: I2Coled
Please specify also your country and your city, this are only for our personal statistics.

Get the SW clicking here, but remember to ask us the password for open it.

Some extra info concerning this software

We used the CUBE-MX for generate the MCU configuration for KEIL.
Then we inserted the library for drive the SSD1306 Oled I2C display.
In the OLED library there is some include and I2C name that are:
#include “stm32l0xx_hal.h
In the main.c there is the define:
I2C_HandleTypeDef hi2c1;
so in the OLED library we use the same name to refer to the I2C port that is hi2c1

If you need use another NUCLEO board the suggestion is:
Generate your project using the CUBE-MX and next insert in your project the OLED library.
Next change in the OLED library the:
#include “stm32l0xx_hal.h
according to your project.

Last but not least, remember to control the file:
The name of file change in according to STM32 family that you use.

Below there is the CUBE-MX pins allocations, the CUBE-MX project is present in the P2P-SPIRIT1