General

TMF8x01begin() function fails when ESP32 wakes from sleep

userHead Mark.Petereit 2023-02-12 09:57:30 703 Views0 Replies

I have a TMF8701 sensor hooked to an ESP32 that I'm trying to use to take a water level measurement every 15 minutes.

 

It works when the ESP32 is first started up. But after the first ESP32 sleep/wake cycle, the tof.begin() function fails.

 

Is there something in addition to the sample code that I need to do to re-initialize the TMF8701 when the ESP32 wakes? Or do I need to completely remove power from the TMF8701 when the ESP32 goes to sleep?