Skip to content

Add start low power periodic measurement #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion adafruit_scd4x.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
_SCD4X_DATAREADY = const(0xE4B8)
_SCD4X_STOPPERIODICMEASUREMENT = const(0x3F86)
_SCD4X_STARTPERIODICMEASUREMENT = const(0x21B1)
_SCD4X_STARTLOWPOWERPERIODICMEASUREMENT = const(0x21AC)
_SCD4X_READMEASUREMENT = const(0xEC05)
_SCD4X_SERIALNUMBER = const(0x3682)
_SCD4X_GETTEMPOFFSET = const(0x2318)
Expand Down Expand Up @@ -229,7 +230,11 @@ def stop_periodic_measurement(self):

def start_periodic_measurement(self):
"""Put sensor into working mode, about 5s per measurement"""
self._send_command(_SCD4X_STARTPERIODICMEASUREMENT, cmd_delay=0.01)
self._send_command(_SCD4X_STARTPERIODICMEASUREMENT)

def start_low_periodic_measurement(self):
"""Put sensor into low power working mode, about 30s per measurement"""
self._send_command(_SCD4X_STARTLOWPOWERPERIODICMEASUREMENT)

def persist_settings(self):
"""Save temperature offset, altitude offset, and selfcal enable settings to EEPROM"""
Expand Down