Adafruit Pi Zero OLED

The Adafruit Pi OLED fits on top of the Raspberry Pi Zero W and uses I2C pins, not GPIO pins, which is really excellent

Just plug it in and go to the Adafruit web site and look up “Usage” and follow the steps to ensure it works

In a few days I will have this cute little Adafruit Pi OLED, and will be able to write to it almost as easy as printing a line using printf in C. To prepare, I have added a couple print statements for the L and C sections of the stepper motor control code. Here is what it looks like:

The code knows which stepper motor you are switched to, and I just print the encoders position. I keep the last position it was at if you switch – so it ends up being exactly like if you were tuning the knobs and recording the positions when tuning the front controls manually. This will come in handy in future releases of the u.RAT, when I add in memory support and where you could assign a KPOD button to a memory location.

Adafruit has complete specs and instructions for the Pi OLED:×32-mini-oled-for-raspberry-pi/overview

In fact, they have the schematic and even the Fritzing files for this device. I can’t begin to tell you how much I am learning and how fast. Since we live in a day where electronic circuits are SMD based boards, we have gone from the days where you needed to know about each discreet device (like when I soldered Heathkit HW-7 and HW-8 or Elecraft K1 and pre-Elecraft SSD kits), to a day where all you need to know is what you want your project to do and then understand your circuit by block diagram, in most cases, each circuit board is a block in your block diagram. be

In the Raspberry Pi and Arduino world – you source boards that use resources, plan to use them properly, plug them in and then learn a few C or Python commands from a library that you can download from Github. The most complex electronics have now been democratized so anyone can invent using commodity components. Its not evolutionary, its revolutionary.

It also encourages people of all walks of life to learn about electronics and coding. Ham Radio surely is joining these wonderful ranks, in fact, I see a future where Makers become hams and vice versa. Win win.

I need to find a C library out there for this little Pi OLED – I did a quick Google search and found a few, but I need to research to find the best one that fits this project.

I at least have my code ready – with printf statements in the right place and where all I will need to do is replace the printf with whatever puts the text on the OLED. Here is the Adafruit Library:

But it seems to have so much more junk in it than I need – like drawing lines and stuff. I just need “hello world” level stuff – just character / text.

Here is one library – just text – which is what I need:

And the code to print is exactly what I had hoped for:

// include the library code:
#include <TinyWireM.h>
#include <LiquidCrystal_SSD1306.h>

// initialize the library with the numbers of the interface pins
#define OLED_RESET 4

void setup() {
 // set up the LCD's number of columns and rows:
 lcd.begin(21, 7);
 // Print a message to the LCD.
 lcd.print("hello, world!");

void loop() {
 // set the cursor to column 0, line 1
 // (note: line 1 is the second row, since counting begins with 0):
 lcd.setCursor(0, 1);
 // print the number of seconds since reset:
 lcd.print(millis() / 1000);

2 Comments on “Adafruit Pi Zero OLED

  1. Yes, the modularization of hobbyist electronics has been both a boon and absolutely necessary, because we’re long past the days when one might reasonably built the most complex circuits from scratch. Do you really want to build your OLED display from scratch? Hardly. And there’s not that much value in re-implementing the reference design anyway; the excitement is in the novel application of those designs.

    Now anyone who can read a datasheet can treat the individual components as “black boxes” and everything is reduced to a systems integration problem. Assuming modules are available that do what you want, you can get from concept to implementation very, very quickly.


    • The funny think is, ham radio is the thing that lead me to my software career, and now I am back to electronics plus software. And because I have been designing data bases and data flows, the two disciplines have become one. Amazing times!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: