After my sensor got disconnected and reconnected the reading was no longer correct. To figure out when this happens I added the getStatus() function. When such an event occurred calling reset() would bring the reading back reliably.
I tested my code on an ESP32 using I2C. Whenever getStatus() reports 0xFF the sensor starts sending valid data again after calling reset(). It appears also begin() needs to be called on the sensor.
After my sensor got disconnected and reconnected the reading was no longer correct. To figure out when this happens I added the getStatus() function. When such an event occurred calling reset() would bring the reading back reliably.
I tested my code on an ESP32 using I2C. Whenever getStatus() reports 0xFF the sensor starts sending valid data again after calling reset(). It appears also begin() needs to be called on the sensor.
I did not test using SPI.