I know that clock stretching is an issue with the BNO055, so I again inserted dtparam=i2c_arm_baudrate=10000 into /boot/config.txt but I still get the output below.
Traceback (most recent call last):
File “/home/pi/bno08x_simpletest.py”, line 27, in
accel_x, accel_y, accel_z = bno.acceleration # pylint:disable=no-member
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 589, in acceleration
self._process_available_packets()
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 785, in _process_available_packets
self._handle_packet(new_packet)
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 843, in _handle_packet
raise error
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 838, in _handle_packet
_separate_batch(packet, self._packet_slices)
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 353, in _separate_batch
required_bytes = _report_length(report_id)
File “/usr/local/lib/python3.7/dist-packages/adafruit_bno08x/init.py”, line 342, in _report_length
return _AVAIL_SENSOR_REPORTS[report_id][2]
KeyError: 123
%Run 'python3 blinkatest.py'
Hello blinka!
Digital IO ok!
I2C ok!
Traceback (most recent call last):
File "/home/pi/python3 blinkatest.py", line 16, in <module>
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 186, in __init__
self._spi = _SPI(portId)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/spi.py", line 22, in __init__
self._spi = spi.SPI(device=(portid, 0))
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/spi.py", line 167, in __init__
raise IOError("{} does not exist".format(device))
OSError: /dev/spidev0.0 does not exist
It may not be that there’s an error with whether it’s installed correctly, but rather than the implementation is causing an issue in this project. From reading over the output and error messages, it appears that there’s currently an issue with the particular script that you’ve got as it is consistently failing on line 16. Could you please upload the script that you’re currently running? I’ll take a look over it and see whether I can spot where this bug is coming up for you.
Out of curiosity, can we quickly check that busio is imported correctly. I can’t think of any other reason why the script continuously trips on this line. If you enter a terminal, type python to open up a CLI and then type import busio followed by busio we should get an echo back to confirm that the library is correctly imported and valid.
This is the line that we appear to be having issues with, we’re looking into what’s causing that here now. spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
pi@raspberrypi:~ $ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import busio
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named busio
I’m going to get another memory card to build from scratch; will be back in an hour.
Thanks
Richard
pi@raspberrypi:~ sudo pip3 install adafruit-blinka
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: adafruit-blinka in /usr/local/lib/python3.7/dist-packages (5.9.0)
Requirement already satisfied: Adafruit-PlatformDetect>=2.18.1 in /usr/local/lib/python3.7/dist-packages (from adafruit-blinka) (2.23.0)
Requirement already satisfied: sysv-ipc in /usr/local/lib/python3.7/dist-packages (from adafruit-blinka) (1.0.1)
Requirement already satisfied: Adafruit-PureIO>=1.1.7 in /usr/local/lib/python3.7/dist-packages (from adafruit-blinka) (1.1.8)
Requirement already satisfied: RPi.GPIO in /usr/lib/python3/dist-packages (from adafruit-blinka) (0.7.0)
Requirement already satisfied: rpi-ws281x>=4.0.0 in /usr/local/lib/python3.7/dist-packages (from adafruit-blinka) (4.2.5)
Requirement already satisfied: pyftdi>=0.40.0 in /usr/local/lib/python3.7/dist-packages (from adafruit-blinka) (0.52.0)
Requirement already satisfied: pyserial>=3.0 in /usr/lib/python3/dist-packages (from pyftdi>=0.40.0->adafruit-blinka) (3.4)
Requirement already satisfied: pyusb>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from pyftdi>=0.40.0->adafruit-blinka) (1.1.0)
pi@raspberrypi:~
Regarding the python version, I checked per below, and it seems 2.7, however my BNO055 ran perfectly from Thonny?
pi@raspberrypi:~ $ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
How unusual, we’re still working on the setup of this at the moment with the BNO085 in the office, Oliver will be keeping you updated as we work on possible solutions to get this working. We managed to get some functionality earlier running with a Pi Zero but it kept crashing. We’re going to try and replicate it on another board. We’ll keep you in the loop as we solve this.
Did you try the software I2C driver?
As mentioned, I did try inserting dtparam=i2c_arm_baudrate=10000 into /boot/config.txt per Adafruit’s guide This worked for the BNO055 but not BNO085.