From 17db1c17281dd3e7d4c402235d255a2a85914e95 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 19 Jan 2021 10:42:32 -0600 Subject: [PATCH 1/2] Add a sleep for use with MCP2221A. --- adafruit_scd30.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adafruit_scd30.py b/adafruit_scd30.py index 63bbebc..d1f1be1 100644 --- a/adafruit_scd30.py +++ b/adafruit_scd30.py @@ -65,6 +65,9 @@ def __init__(self, i2c_bus, ambient_pressure=0, address=SCD30_DEFAULT_ADDR): self.measurement_interval = 2 self.self_calibration_enabled = True + + # Not in datasheet, but needed for use with Blinka/MCP2221A + sleep(0.01) # sets ambient pressure and starts continuous measurements self.ambient_pressure = ambient_pressure From c915fa41e957d2b8202befe56e5d5bab5471581b Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 19 Jan 2021 10:42:56 -0600 Subject: [PATCH 2/2] DO NOT MERGE comment out the 'reset' for MCP2221A usage --- adafruit_scd30.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_scd30.py b/adafruit_scd30.py index d1f1be1..952bd48 100644 --- a/adafruit_scd30.py +++ b/adafruit_scd30.py @@ -61,7 +61,8 @@ def __init__(self, i2c_bus, ambient_pressure=0, address=SCD30_DEFAULT_ADDR): self._buffer = bytearray(18) self._crc_buffer = bytearray(2) - self.reset() + # Disabled for use with Blinka/MCP2221A + # self.reset() self.measurement_interval = 2 self.self_calibration_enabled = True