I have a Breakout phat mini with SPI on Pi3. When I execute a luma example ie
demo.py or maze.py I get the error SPI device not found. I am using she SPI model
of the 1.12’ mono oled. I also have I2C version and it works fine. Any help?
Make sure SPI is enabled in raspberry Pi config. And follow the install instructions listed here
The Breakout Garden installer only detects i2c devices. You have to manually install what’s needed for SPI devices.
I do believe @Crowbot has one of those and figured it out.
Yes, but I can’t remember just now. :( I’ll have to look through my stuff.
This is what I went through with my SPI display on my Breakout garden Mini. Maybe it will help
For me and my display it was the following for scrolling text.py
Mini Breakout Garden
port=0,
cs=ST7789.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
backlight=19, # 18 for back BG slot, 19 for front BG slot.
I’ll go double check in a bit, but in the end I don’t believe I had to edit those to get it to work.
I’m using this display though which works a bit different from the oled.
EDIT: I can confirm I am using the stock values in scroll-test.py I posted above with my screen.
The Breakout Garden Min SPI is wired the same as, and seen as, the Breakout Garden Hat Front slot.
I did get the SPI OLED woking! Thank you all for your help!!
The thing that got the ball rolling was raspi-confg enabling SPI.
I still do not have a grasp of the spi-port/spi-device concept.
Thanks again everyone!!
It goes something like this.
You can use those breakouts without the Breakout Garden Hat or Breakout Garden Mini. You solder on a header and connect it to the Pi’s GPIO. The install instructions for the breakout tell you what pin goes to what GPIO etc.
Or plug it into the Breakout Garden Hat or Mini, it makes all the connections for you. Thing is the Mini has one SPI plug and the Hat has two. The examples for said breakout should work if its in the front port of the Hat, or in the SPI on the Mini. Plug it into the second, rear, SPI on the Hat and you have to make changes to the python examples to get it to work.
i2c is a shared bus and you can plug multiple devices as long as no two have the same i2c address. The Breakout Garden installer polls all the addresses to see what’s there and installs the extra software based on what it finds.
You can’t do that with SPI it works differently. There is no easy way to tell what’s there. So you end up doing the manual install for any SPI device you want to use. And it gets even trickier if you have more than one device connected.