Raspberry Pi OLED Display

I am trying to use my Monochrome 1.3" 128x64 OLED graphic display with my Raspberry Pi Zero W but am unable to receive any output on the display. I followed instructions from Adafruit on how to wire the display (I am using the SPI interface) as well as run a Python program to test it. The wiring is correct, and I have installed the required Python libraries, but when I run the ‘shapes.py’ program which is used in the instructions, nothing happens with the display. There are no errors when I run the program. I was wondering what I can do to troubleshoot this.

1 Like

The first thing I would do is check for any error messages. Is there a /var/log directory ? If so you can check the files in there. There may be a syslog file, for example.

If you can get two terminal windows going at the same time, you can watch one of the log files while you run the shapes.py program. Something like this:

tail -f /var/log/syslog

Also, how are you running the python program? Are you root? Or using sudo shapes.py ?

I watched the log file as you suggested but there wasn’t any change while I ran the program. I’m running the program with sudo python shapes.py.

Are there any other log files in /var/log ?

I wonder if you can do just

tail -f /var/log/*

That might be wonky at first (since sometimes there are binary files in there), but at least it should show you anything being logged in any file.

I’m making the assumption this is a software problem, of course, but it could be hardware. I’m sure you’ve wired it properly, but I wonder if there is a way (with a multimeter or something) to check voltage levels while the program is running?

I found this at the end of the syslog file although I’m not sure what it means or if it is relevant:
Jan 21:17:01 raspberrypi CRON[21025]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
I don’t have access to a multimeter right now, but I think it is possible to use one to test the voltage levels of the display.

No, that’s just normal crontab running every hour. It’s not related to this.

Is there any other program that you can run to light up the display? Or are there pins you can short to have it display something on the screen (ie: a test pattern)?

As far as I know, the only way to turn on the display is through Python, however, there are other libraries which I can use. I’m not familiar with how I can short the pins on the display, could you elaborate on that?

Photos for reference. We are still working on it :slight_smile:

I tried using the new power supply but the result didn’t change. When I ran one of the programs after disconnecting the display it gave this warning:
/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py:164 RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. self._gpio.setup(pin, self._gpio.OUT)

Ok, so I’m starting to think that something’s wrong at the physical level. We’ll talk tomorrow and try some other stuff if you’d like,