Hi,
I’m using a I2C multiplexer from 8086-X, because the VL53L1X sensor are not able to change the i2c address x29 permanently.
I after installation I see the following:
pi@raspberrypi:~ i2cdetect -y 7
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
and
pi@raspberrypi:~ i2cdetect -y 8
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – 29 – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: UU – -- – -- – -- –
pi@raspberrypi:~ $
in the examples git there is a line
tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29)
tof.open()
so I tried to change it in
tof1 = VL53L1X.VL53L1X(i2c_bus=7, i2c_address=0x29)
tof1.open()
and add
tof2 = VL53L1X.VL53L1X(i2c_bus=8, i2c_address=0x29)
tof2.open()
starting the program I’ve got the error message:
pi@raspberrypi:~/thunderborg $ sudo python dist2.py
distance.py
Display the distance read from the sensor.
Uses the “Short Range” timing budget by default.
Press Ctrl+C to exit.
VL53L1X Start Ranging Address 0x29
VL53L0X_GetDeviceInfo:
Device Name : VL53L1 cut1.1
Device Type : VL53L1
Device ID :
ProductRevisionMajor : 1
ProductRevisionMinor : 15
Traceback (most recent call last):
File “dist2.py”, line 28, in
tof2 = VL53L1X.VL53L1X(i2c_bus=8, i2i_address=0x29)
TypeError: init() got an unexpected keyword argument ‘i2i_address’
I assumed, that using different i2c busses solve the problem, but import VL53L1X seems not to support several i2c busses? Or are there further functions available to bring it up and running.
I saw something like this for python
bus14 = smbus.SMBus(14)
bus15 = smbus.SMBus(15)
this doesn’t fit in the tof-statement tof1 = VL53L1X.VL53L1X(i2c_bus=7, i2c_address=0x29)above?
Any ideas.
Many thx
Peter