I have a BrickPi3. I have been using a PS4 controller with it: pyPS4controller. It works fine, but because it is strictly event-based (onPress, onRelease) it has limitations.
I found pygame and adapted it to something closer to what I need. However, I am getting a conflict…
When I import and run pygame, the trace output works as planned.
When I also import and run brickpi3, I get the following error:
Traceback (most recent call last):
File “usr/local/lib/python3.5/dist-packages/brickpi3-0.0.0-py3.5.egg/brickpi3.py”, line 295, in init
manufacturer = self.get_manufacturer()
File “usr/local/lib/python3.5/dist-packages/brickpi3-0.0.0-py3.5.egg/brickpi3.py”, line 411, in get_manufacturer
raise IOError(“No SPI response”)
OSError: No SPI responseDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/pi/Desktop/PiWarsAtHome/2024/PS4EventsBot.py”, line 3, in
BP = brickpi3.BrickPi3()
File “/usr/local/lib/python3.5/dist-packages/prickpi3-0.0.0-py3.5.egg/brickpi3”, line 298, in init
except IOError():
TypeError: catching classes that do not inherit from BaseException is not allowed
I have tried to hack the brickpi code to eliminate the manufacturer call, but other than that I’m at a loss. Hope you can help.