Skip to content

Commit 52951e1

Browse files
committed
add function for starting low power periodic measurement
1 parent 9d60097 commit 52951e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adafruit_scd4x.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
_SCD4X_DATAREADY = const(0xE4B8)
4444
_SCD4X_STOPPERIODICMEASUREMENT = const(0x3F86)
4545
_SCD4X_STARTPERIODICMEASUREMENT = const(0x21B1)
46+
_SCD4X_STARTLOWPOWERPERIODICMEASUREMENT = const(0x21AC)
4647
_SCD4X_READMEASUREMENT = const(0xEC05)
4748
_SCD4X_SERIALNUMBER = const(0x3682)
4849
_SCD4X_GETTEMPOFFSET = const(0x2318)
@@ -231,6 +232,10 @@ def start_periodic_measurement(self):
231232
"""Put sensor into working mode, about 5s per measurement"""
232233
self._send_command(_SCD4X_STARTPERIODICMEASUREMENT, cmd_delay=0.01)
233234

235+
def start_low_periodic_measurement(self):
236+
"""Put sensor into low power working mode, about 30s per measurement"""
237+
self._send_command(_SCD4X_STARTLOWPOWERPERIODICMEASUREMENT, cmd_delay=0.01)
238+
234239
def persist_settings(self):
235240
"""Save temperature offset, altitude offset, and selfcal enable settings to EEPROM"""
236241
self._send_command(_SCD4X_PERSISTSETTINGS, cmd_delay=0.8)

0 commit comments

Comments
 (0)