PiicoDev OLED Module SSD1306 - Raspberry Pi Pico Guide

Michael just shared a new tutorial: “PiicoDev OLED Module SSD1306 - Raspberry Pi Pico Guide”



Let’s get started with the PiicoDev® OLED Module SSD1306. In this guide, we’ll connect the PiicoDev OLED to our Raspberry Pi Pico and get it working with some example code to display text, shapes, and animations.

To follow alo…

Read more

2 Likes

Thank you for the samples and explanations! They are much appreciated.
I am keen to know some more about how to implement this gorgeous little screen into my projects - for example, how do I send it info from my sensors to it? I"m putting together the weather station kit, and the kit instructions seem to be missing that vital but of info.

2 Likes

Hi Steve,

Its covered down in the graph distance section: PiicoDev OLED Module SSD1306 - Raspberry Pi Pico Guide - Tutorial Australia

The weather station kit just includes a few of the parts that you could use for different projects - the Pico W is a super versatile MCU, you could also output to MQTT, a webserver and other neat services with some programming/other bits of hardware!

2 Likes

Hi Steve,

How’d you get on with your weather station kit? As Liam has already mentioned graphing is covered in the guide but if you could give us a bit more info about your setup we might be able to provide some more specific advice. What kit were you using?

2 Likes

Hi Michael.

New to Pico so I’m just working through the Piico.dev starter pack V1.2.

When I upload the 3 files for the OLED module to my Pico WH I get a memory error. I have deleted the existing files on the Pico and rebooted.

Could not write next block after having written 1024 bytes to /main.py
Make sure your device’s filesystem has enough free space. (When overwriting a file, the old content may occupy space until the end of the operation.)

1 Like

Sorted! Needed to boot the Pico with the BOOTSEL button. I assume this clears the memory.

2 Likes

Hi Mark,

Glad to hear you got it sorted!

Holding the BOOTSEL button usually takes you into the USB-drive mode, where you can drop UF2 images onto the Pico, pressing control + F2 (initiating a reset) might also clear this error.

Liam

3 Likes

When I load and display the demo .pbm image things work as advertised.
The demo image background is white. With the load_pbm colour parameter set at 1 why don’t I see the display as mainly white?

1 Like

Hi Mark,

Would it be possible to send through some photos of what you are after?

I wasn’t involved in developing the drivers for the OLED, but might be able to share some insight - with the PBM file 1 is encoded as black, and 0 white, on the OLED, the colour ‘1’ is encoded as white instead, the driver steps through each of the bytes and checks that they match, flipping the colour.
At a hardware level, it makes sense to that ‘1’ is on, this also keeps more of the OLED black to reduce power and wear,

Let us know if you have any more questions!
Liam

1 Like

Thanks Liam.

I see now that the .pbm file as viewed on the OLED is the inverse of the pbm file as viewed on my PC. No idea why though!

from PiicoDev_SSD1306 import *
display = create_PiicoDev_SSD1306()
display.load_pbm(‘piicodev-logo.pbm’, 1)
display.show()


1 Like

Hi @Mark285907,

The reason that you’re seeing the colours reversed is that the oLED is treating the black of the bitmap as what is to be lit up on the screen. If you’re wanting to flip the bitmap, you would need to add in an additional line of code that tells the display to fill with white before the load_pbm line and you would change the colour parameter of the load_pbm to be 0 instead of 1.

# Display a portable bitmap image (.pbm)
from PiicoDev_SSD1306 import *
display = create_PiicoDev_SSD1306()

display.fill(1)
display.load_pbm('piicodev-logo.pbm', 0)
display.show()

2 Likes

Thanks Dan. That works for me and with the .pbm file I created for testing.

Cheers.

2 Likes

Hi @Mark285907

No worries at all, best of luck with your project!

1 Like