0

I have some troubles to run bno_simpletest.py correctly.

I updated my raspbian, activated serial port, disabled bluetooth, I'm using serial.Serial, I tried both commands in the code :

"uart = serial.Serial("/dev/serial0")",
"uart = serial.Serial("/dev/ttyAMA0")"

But I still have the same problem, it's working a few seconds (randomly between 2 and 30 seconds) and then I the following message :

"Traceback (most recent call last):
File "bno055_simpletest.py", line 23, in <module>
print("Gravity (m/s^2): {}".format(sensor.gravity))
File "/usr/local/lib/python3.7/dist-packages/adafruit_bno055.py", line 323, in gravity
return self._gravity
File "/usr/local/lib/python3.7/dist-packages/adafruit_bno055.py", line 450, in _gravity
resp = struct.unpack("<hhh", self._read_register(0x2E, 6))
File "/usr/local/lib/python3.7/dist-packages/adafruit_bno055.py", line 409, in _read_register
raise RuntimeError("UART read error: {}".format(resp[1]))
RuntimeError: UART read error: 7"

I don't know what's going on, it's not always with Gravity, it's completely random, can you help me please... I really don't know what to do...

  • I get the same error when using python3/CircuitPython and the simpletest.py in the repo. However, using the deprecated version, it works just fine (https://github.com/adafruit/Adafruit_Python_BNO055) I'm very new to this so I don't know how bad it is if you just switch to the older v, maybe worth a try though. – Ioana Susnoschi Jul 17 '20 at 09:43
  • Thank you for your answer ! You're right there is not the same error with the previous version of the library. I'm exchanging with one of the devs of the library of the Adafruit forum, maybe he will have a better solution. (https://forums.adafruit.com/viewtopic.php?f=60&t=167431&p=820427#p820427)

    Keep in touch !

    – adelalla Jul 19 '20 at 16:03

0 Answers0