Skip to content

Commit

Permalink
Merge pull request #13 from OrFrederick/master
Browse files Browse the repository at this point in the history
Added set_humidity
  • Loading branch information
Gadgetoid committed Jan 15, 2024
2 parents ef99b70 + 114e6e9 commit c1d6cef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/sgp30/__init__.py
Expand Up @@ -174,5 +174,13 @@ def get_baseline(self):
def set_baseline(self, eco2, tvoc):
self.command('set_baseline', [tvoc, eco2])

def set_humidity(self, humidity):
"""Set the absolute humidity on the SGP30 for more acurate readings of air quality signals (TVOC & eCO2)
:param humidity: absolute humidity value as integer or float
"""
self.command('set_humidity', [round(humidity)])

def __del__(self):
self._i2c_dev.close()

0 comments on commit c1d6cef

Please sign in to comment.