RSS Amplifier

Romilly’s RAREblog · May 4, 2025

Drive an OLED from a Pico

0
Sign in to vote or save

Romilly Cocking · Romilly’s RAREblog

What's the simplest way to display data from the Raspberry Pi Pico?

The Pico has lots of cool features, but it has no display. I often use print statements to get output from a Pico, but they won't display graphics.

One option is to connect the Pico to an OLED display.

I've been working on a simple project that needed the pico to plot a simple graph.

I had the parts I needed; a Pico, an I2C OLED display, a connector and a breadboard.

The display uses a Grove socket, and I had a suitable Grove connector. All I had to do was connect them.

None of the components needed any soldering, so I could wire them up very quickly.

I had a Pico WH available. That's the original Raspberry Pi Pico W with wireless support and a header already soldered.

The display is a Grove 1.12" V2 monochrome display which I got from Cool components.

It uses the Grove connector system, and I connected it using this cable from the Pi Hut:

Here's the breadboard which I got from monkmakes:

You can use an ordinary breadboard, but this one makes it easier to connect to the right pins!

I connected the four wires of the Grove connector to the breadboard, plugged in the Pico W and powered it up via USB.

I used Thonny to install the code. I found a driver for the display which I'd used on another project, and I wrote a short micropython script to output some text.

from machine import Pin, I2C

from sh1107 import SH1107_I2C

i2c0 = I2C(0, scl=Pin(1), sda=Pin(0), freq=400000)

display = SH1107_I2C(128, 128, i2c0, address=0x3c)

display.sleep(False)

display.fill(0)

display.text('OLED', 0, 0)

display.text('and', 0, 10)

display.text('I2C!', 0, 20)

display.show()

Here's what I saw.

That was the first step towards my plotting project.

You can read about the rest of the project tomorrow. It uses the Pico and OLED to show how the current through an LED varies with the value of the load resistor that you use.

That's vital to know if you're using an LED in your project and don't want to burn it out!

Until tomorrow.

Read the original on rareblog.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.