Have to reset power on VL53L4CX before code works again
Hi,
I'm using an ESP32 (the RAK11200 module) with my own board (https://github.com/cyclops1982/TOFBoard/tree/main/TOFBoard).
I'm using this helper file and basically do:
1. A init() during the arduino setup()
2. During the arduino loop() i run the GetDepthInMiliMeters()
When i start this the first time, it all works fine. Measurements work as expected. I can run GetDepthInMiliMeters() multiple times and it all works gloriously.
When i reset the ESP (via the reset button), it doesn't work anymore. The VL53L4CX_SetXTalkCompensationEnable() returns 2; (not -2).
If i unplug my own board, and plug it back in and then run the GetDepthInMiniMeters, then it fails on the VL53L4CX_SetDistanceMode() with a division by zero error.
unplugging the ESP and booting it again seems to work fine.
I'm wondering if this has anything to do with my board design, or with my code. Or maybe just the combination of the ESP32 board and my own board.
