Disable SPI causes GoPiGo libraries to not exist?

Greetings!

While messing with my 'bot, I tried some configuration changes and - since I don’t use SPI, I turned it off in raspi-config.

Later on, I discovered that any Python program that depended on the GoPiGo libraries would fail because one of the libraries attempts to open the SPI port.

Viz.:

Python 3.7.3 (/usr/bin/python3)
>>> %cd /home/pi/Desktop/Project_Files/GoPiGo3/Projects/RemoteCameraRobot
>>> %Run 'Servo Test.py'
Traceback (most recent call last):
  File "/home/pi/Project_Files/GoPiGo3/Projects/RemoteCameraRobot/Servo Test.py", line 5, in <module>
    from gopigo3 import FirmwareVersionError
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/local/lib/python3.7/dist-packages/gopigo3-1.2.0-py3.7.egg/gopigo3.py", line 30, in <module>
    GPG_SPI.open(0, 1)
FileNotFoundError: [Errno 2] No such file or directory
>>> 

Why is there a dependency on SPI?  The GoPiGo daughterboard doesn’t even have pins for SPI.

RPi talks to the GoPiGo board via spi! (Pins 35-38 of the atmel)

1 Like

I thought that too, but the Raspberry Pi GPIO pinouts place the SPI interface way past the 26 pins the GoPiGo board uses.

Oops!
My bad. . .  There are two SPI busses! One inside the range of the GPG boards pinout.

SPI0 is on the schematic

1 Like

SPI0 is definitely needed!

2 Likes