Error with Adafruit BNO0555 Orientation Sensor in newe Raspberry

211 views Asked by At

I hab a Adafruit BNO055 Orientation sensor, and it ran well on my Raspi Pi 3 B+. I now did an upgrade to Pi 4, and installed all the libraries I had one the B+ 3.

The only difference in my system setting now is, that I had Python 3.5 before and now on the Pi 4 it is Python 3.7

When I intitialize my sensor in my Py-File like this

from Adafruit_BNO055 import BNO055

bno = BNO055.BNO055(serial_port='/dev/serial0', rst=18)

I will receive the following error:

Traceback (most recent call last): File "PID.py", line 166, in bno = BNO055.BNO055(serial_port='/dev/serial0', rst=18) # Sensor Initialization (serial) File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_BNO055/BNO055.py", line 226, in init self._gpio.setup(self._rst, GPIO.OUT) File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_GPIO/GPIO.py", line 278, in setup pull_up_down=self._pud_mapping[pull_up_down]) TypeError: argument 1 must be str, not int

does anyone know where this might come from? I checked, the BNO055 package is the same version as previously on my Pi 3 B+.

Can it be that this problem is caused because I use Py3.7 instead of Py3.5 now?

Best Klaus

0

There are 0 answers