Streaming Radio Player: RPi and OLED Updates

Because the OLED driver came from the pip package manager, not the Raspberry Pi’s system-level apt package manager, it (or they, there’s plenty of code under the hood) don’t get updated whenever I do system maintenance. The doc says this should do the trick:

sudo -H pip install --upgrade luma.oled

However, it turns out the new version has a slightly longer list of pre-requisite packages, causing the update to go toes-up at a missing package:

Could not import setuptools which is required to install from a source distribution.
Please install setuptools.

So update (or install, for the new ones) the missing pieces:

sudo apt-get install python-dev python-pip libfreetype6-dev libjpeg-dev build-essential

Doing so produced a backwards-compatibility error in my Python code:

... change ...
from luma.core.serial import spi
... into ...
from luma.core.interface.serial import spi

The motivation for all this fuffing and fawing came from watching some OLEDs wake up completely blank or become garbled in one way or another. Evidently, my slower-speed SPI tweak didn’t quite solve the problem, although it did reduce the frequency of failures. I have decided, as a matter of principle, to not embrace the garble.

Soooo, let’s see how shaking all the dice affects the situation.

It’s entirely possible the OLED controllers don’t quite meet their specs, of course, or have begun deteriorating for all the usual reasons.

One thought on “Streaming Radio Player: RPi and OLED Updates

Comments are closed.