Display Skittle Colour on OLED Display module

Learned how to wire up the tiny OLED screen. I displayed a custom image of a skittle, with a colour label below it that cycles through the colours.

Aug 14, 2024

Wired up the tiny OLED Display module (tiny cute adorable magical screen of yay).

The video shows a static image of a skittle, and then cycles through different skittle colours. My plan for this was to flash up the color of a skittle after the colour sensor has detected it 🌈

The super fun part of this is figuring out how to stack a static image on top of text that changes.

Here's how you do that! 😄

1. Draw a monochrome image (two colours), the same size as the display but with room for text below (for this example).

2. Convert the image into a bitmap array, which looks a bit like this:
[0x00, 0x00, 0xff, 0xfe, 0x00, 0x00....... very long array). Here's what these mean:

• 0x00: 8 bits, all off.
• 0xFF: 8 bits, all on.
• 0x7F: The first bit off, the remaining seven bits on.
• 0xFE: All bits on except for the last one.

We need a bitmap array because the image is drawn with light, by turning each pixel on (color), or off (black) = monochrome image. It's also where the name for this component comes from: OLED stands for 𝐎rganic 𝐋ight 𝐄mitting 𝐃iode.

Then you need to write code to change the text. I pasted the default code example that came with the component into ChatGPT, and asked it to modify the code according to my instructions, it was an iterative process.