Sketch using VL53L1X ToF Sensor crashes Nano 2040 Connect

Hi all,

I'm trying to port a sketch that works perfectly on my Nano 2040 Connect when uploaded using the MacOS IDE, to Arduino IOT. I have uploaded other IOT sketches to the board, eg examples, and they work fine. This sketch uses I2C to communicate with an Adafruit VL53L1X Time of Flight Distance Sensor (including their library), in order to measure distance to an object.

When I created the sketch as a "thing" via the IOT dashboard, I took care to include the required header files and library calls, everything works fine until it tries to access the VL53L1X device via I2C, at which point the board simply reboots, reloads, tries to access the device, reboots, etc. Endless loop. No error messages generated--it just keeps rebooting over and over again when it gets to that step.

Any clues as to how I can get this working? As I mentioned, the same sketch (minus the IOT setup and update calls) will run for hours and hours without an issue. In the IOT environment, it crashes the first time, every time.

Thanks in advance for any help on this.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.