An OLED or Organic LED display is a type of technology used to make screens. Our example will be using an SSD1306, which is a monochrome 128x64 pixel display, however, the information will apply to other OLED displays too.Â
Our sample program will read your Raspberry Pi's CPU temperature and display it on the OLED display together with a thermometer icon. We will be assuming the OLED will connect using an I2C interface, however, an SPI interface device should also be compatible if you use an spi() instance (like in the APA102 example) for the serial object. The ability to change the interacting method used by the Luma library means you can reuse existing code with compatible display devices with minimal code changes.
We will commence by connecting the OLED display to the Raspberry Pi and verifying that it is connected.