Insane struggle setting up 1.12" mono oled (SPI)

Hi all! I’m all new to the Pimoroni world and just got a nice breakout garden set-up consisting of the haptic breakout, a trackball and the 1.12" mono oled (SPI). The lra and the trackball worked just fine, super nice! Sadly I just can’t get the display to do anything… I’ve researched the luma.oled drivers and the pimoroni forums and followed every approach I could find… I still get the error ‘SPI device not found.’ I made triple sure to have spi enabled in raspi-config. Surely I followed the three step tutorial on the product page. Right now I’d be happy just to run an example. Anybody experienced similar issues? Any kind of help would be highly appreciated.

Running on RasPi 3 Model B

This is what I went through with the 1.3 inch LCD and Breakout garden mini.
If you have the Breakout Garden Hat, and are using the rear SPI socket, there are code changes to be made to have it work.

Hey alphanumeric, thanks for replying. I’ve seen your approach yesterday and tried to reproduce it. Sadly it doesn’t work for me.

Do you have the Mini or full sized Hat?
Raspbian Lite or Raspbian with Desktop?
You did the following?

sudo apt install python-dev python-pip libfreetype6-dev libjpeg-dev build-essential libopenjp2-7 libtiff5
$ sudo -H pip install --upgrade luma.oled

and

sudo apt install python3-dev python3-pip libfreetype6-dev libjpeg-dev build-essential libopenjp2-7 libtiff5
$ sudo -H pip3 install --upgrade luma.oled

I’m using the full sized hat with Raspbian Desktop.
Yes, I’ve done that already but just gave it another try to make sure.
Still getting SPI device not found

Running the breakout installer gives me the following:

pi@raspberrypi:~/breakout-garden-master $ sudo ./install.sh
Sorry, I couldn't find any breakouts!

edit
Checking if SPI is enabled:

pi@raspberrypi:~ $ lsmod | grep spi_
spi_bcm2835            20480  0

The Breakout Garden installer will only detect i2c devices. Anything using SPI has to be installed manually. .

In awareness of that,I’ve installed these resources: https://github.com/pimoroni/sh1106-python

Ok, which SPI slot is it plugged into?

Right now it’s facing the HDMI connector.
I’ve tried switching slots and added --spi-device 0 and --spi-device 1

the current error:

pi@raspberrypi:~/luma.examples/examples $ python bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --gpio-data-command 9 --spi-device 1
Version: luma.oled 3.4.0 (luma.core 1.14.0)
Display: sh1106
Interface: spi
Dimensions: 128 x 128
------------------------------------------------------------
/usr/local/lib/python3.7/dist-packages/luma/core/interface/serial.py:185: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  self._gpio.setup(pin, self._gpio.OUT)
usage: bounce.py [-h] [--config CONFIG] [--display DISPLAY] [--width WIDTH]
                 [--height HEIGHT] [--rotate ROTATION] [--interface INTERFACE]
                 [--i2c-port I2C_PORT] [--i2c-address I2C_ADDRESS]
                 [--spi-port SPI_PORT] [--spi-device SPI_DEVICE]
                 [--spi-bus-speed SPI_BUS_SPEED] [--spi-cs-high SPI_CS_HIGH]
                 [--spi-transfer-size SPI_TRANSFER_SIZE]
                 [--ftdi-device FTDI_DEVICE] [--gpio GPIO]
                 [--gpio-mode GPIO_MODE]
                 [--gpio-data-command GPIO_DATA_COMMAND]
                 [--gpio-reset GPIO_RESET] [--gpio-backlight GPIO_BACKLIGHT]
                 [--block-orientation ORIENTATION] [--mode MODE]
                 [--framebuffer FRAMEBUFFER] [--bgr] [--h-offset H_OFFSET]
                 [--v-offset V_OFFSET] [--backlight-active VALUE]
bounce.py: error: SPI device not found

For mine, by default, the python examples were coded for the front slot. Which is the way the one SPI slot on the MINI is wired up. It sounds like you have a defective display?
The following link will let you contact Pimoroni directly via e-mail. I would put a link to this thread in that support e-mail
https://shop.pimoroni.com/pages/contact-us

1 Like

also tried using python3 instead

Thanks a lot for your help!

I do believe @Crowbot used the following with his display.

python3 bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --gpio-data-command 9 --spi-device 1
1 Like

already tried that! also

python3 bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --gpio-data-command 9 --spi-device 0

and both versions with python

Ok, wasn’t 100% sure from what you posted. I guess its time to use the "contact us’ link I posted earlier. It will likely be Monday before you get a reply though. Other than the automated e-mail received first reply. Only other option is to @gadgetoid and @sandyjmacdonald

1 Like

Actually I’ve already sent them a message after your tipp and got a reply. For now the support suggested to try both spi slots, which I gave another try without success. We will see… Thanks a bunch!

One option is to try a different Pi with that hat. Just to rule out an issue with the Pi.
Or solder on a header and connect it to the Pi via jumper wires without using the Hat. If its an issue with the Hat that should fix it. Assuming the software side of things is OK.