Skip to content

Bug fix in python/VL53L0X_multi_example.py for changing i2c address#3

Open
Trifunik wants to merge 1 commit into
Gadgetoid:masterfrom
Trifunik:master
Open

Bug fix in python/VL53L0X_multi_example.py for changing i2c address#3
Trifunik wants to merge 1 commit into
Gadgetoid:masterfrom
Trifunik:master

Conversation

@Trifunik

Copy link
Copy Markdown

Hello,

the example works now.

Regards,
Nikola

@abtyou11

abtyou11 commented May 8, 2024

Copy link
Copy Markdown

hi, why VL53l0x can't download on thonny raspberry pi4 ?

@jdc-cunningham

Copy link
Copy Markdown

Just commenting down here

I have tried to use multiple buses with this library and it does not seem to work.

It uses the last bus set. See my example usage.

Where all three sensors use the last bus used to instantiate a third tof sensor

For now I will try and just change the bus when measuring it sucks but don't want to dive into the c part. I saw a similar thread for another sensor. Not sure if the same fix has to be applied.

GPIO.output(sensor2_shutdown, GPIO.HIGH)
time.sleep(1)
# Set new address for the second VL53L0X
tof.change_address(0x2D)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might need to be tof1.change...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using three sensors in my case, working code here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants