VL53L1X begin Freezes if not connected

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
matt_toplack
 
Posts: 3
Joined: Wed Jan 11, 2023 10:58 am

VL53L1X begin Freezes if not connected

Post by matt_toplack »

Hello!
I am trying to make my code for the VL53L1X as robust as possible, which includes being able to recover if one or more of the sensors I have connected is not connected, is damaged, etc. With the VL53L0X, if there is no sensor connected, it will fail after a short while, allowing me to handle that failure and move on. Unfortunately, it seems that the VL53L1X's library is not set up this way and instead blocks my code from continuing. Any suggestions on modifying the library?

User avatar
adafruit_support_carter
 
Posts: 29786
Joined: Tue Nov 29, 2016 2:45 pm

Re: VL53L1X begin Freezes if not connected

Post by adafruit_support_carter »

Are these Arduino or CircuitPython libraries?

User avatar
matt_toplack
 
Posts: 3
Joined: Wed Jan 11, 2023 10:58 am

Re: VL53L1X begin Freezes if not connected

Post by matt_toplack »

Arduino

User avatar
adafruit_support_carter
 
Posts: 29786
Joined: Tue Nov 29, 2016 2:45 pm

Re: VL53L1X begin Freezes if not connected

Post by adafruit_support_carter »

Does the behavior show up running the simple example from the library?
https://github.com/adafruit/Adafruit_VL ... letest.ino

That only prints "Adafruit VL53L1X sensor demo" and then nothing else? And works as expected when the VL53L1X *is* connected?

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”