Vanilla RPi SensorInit failure.txt (14.3 KB)First, before I start. I have carefully reviewed the associated product tutorials and searched both the web and SparkFun’s Forum for any solution to my problem, but to no avail.
Here is some background about what I’m trying to accomplish:
Through experimentation, I found that if I used a vanilla Raspian image, I could successfully install the Adafruit followed by the SparkFun i2c software onto the Raspberry Pi. With the exception of the Qwiic Mux and Time of Flight (ToF) sensor combo, I have been able to use an Adafruit BNO085 IMU sensor and a SparkFun micro OLED display on the same i2c bus.
Before I discuss the errors that I’m seeing, here is my configuration:
Hardware configuration:
Software configuration:
All commands completed without errors.
o sudo apt-get update
o sudo apt-get upgrade
o sudo apt-get install -y i2c-tools
o pi@raspberrypi:~ $ sudo pip3 install sparkfun-qwiic
o pi@raspberrypi:~ $ sudo pip3 install sparkfun-qwiic-tca9548a
o pi@raspberrypi:~ $ sudo pip3 install sparkfun-qwiic-vl53l1x
When I run vl53l1x_change_i2c_address.py (from the SparkFun Autonomous kit), I get the following errors. Please note that these errors are repeatable.
qwiic_kx13x
: unicode error) ‘utf-8’ codec can’t decode byte 0xa0 in position 173: invalid start byte (qwiic_kx13x.py, line 334)
This means is that the program (vl53l1x_change_i2c_address.py) cannot initialize an i2c ToF sensor (vl53l1x) that is connected to a properly configured i2c Mux (tca9548a). By properly configured, I mean the Mux was programmed with the Mux channel where the ToF sensor was attached (before the “Sensor Init” command was issued).
This problem occurs at line 179 of vl53l1x_change_i2c_address.py.
I’ve uploaded the Terminal logs which details:
o sudo apt-get update
o sudo apt-get upgrade
o sudo apt-get install -y i2c-tools
o sudo pip3 install sparkfun-qwiic
o sudo pip3 install sparkfun-qwiic-tca9548a
o sudo pip3 install sparkfun-qwiic-vl53l1x
o python3 vl53l1x_change_i2c_address.py
Given all of this information, here are my questions:
a) What is this error?
b) Does this error cause Error 2?
c) What is the solution to fix or at worst case, bypass this error?
a) What is this error?
b) What is the solution to fix this error?
image from SparkFun?
I’m sorry for the long post.
What I’m simply asking for is technical assistance to explain why the SparkFun supplied code (vl53l1x_change_i2c_address.py) can’t operate correctly on a basic Raspberry Pi 3B+ that has been loaded with the required Python Qwiic libraries in support of a i2c Time of Flight sensor (vl53l1x) and a i2c multiplexor (tca9548a).
Thanks in advance for your help with this problem.
Regards, …Gary White