adafruit / Adafruit_SGP30

Arduino library for SGP30
Other
53 stars 38 forks source link

Fix 'softReset()' using general reset call #29

Open Tristan-Day opened 7 months ago

Tristan-Day commented 7 months ago

Updated the 'softReset()' call to perform a 'general reset' on the I2c bus according to the SGP30 datasheet. Since the stored i2c device fixes the target address, the current solution does not work. Therefore, an optional theWire parameter is added to allow direct bus access.

Power consumption after including the revised function dropped from 48 ma to expected ESP32 deep sleep levels, indicating success.

This PR resolves #28 and #20