From 8f6cdfc1ebfa2dfe78cb46babfaeffa6863c41c3 Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Tue, 4 May 2021 10:00:02 -0400 Subject: [PATCH 1/2] verifying_references --- adafruit_bmp3xx.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/adafruit_bmp3xx.py b/adafruit_bmp3xx.py index 35d9ae4..c928383 100644 --- a/adafruit_bmp3xx.py +++ b/adafruit_bmp3xx.py @@ -15,14 +15,17 @@ **Hardware:** -* `Adafruit BMP388 `_ +* `Adafruit BMP388 - Precision Barometric Pressure and Altimeter + `_ (Product ID: 3966) **Software and Dependencies:** * Adafruit CircuitPython firmware for the supported boards: - https://github.com/adafruit/circuitpython/releases + https://circuitpython.org/downloads + +* Adafruit's Bus Device library: + https://github.com/adafruit/Adafruit_CircuitPython_BusDevice -# * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice """ import time From 8babfab1bbc5ecae3ee143bfcb15b17a098b897d Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sat, 8 May 2021 22:44:59 -0400 Subject: [PATCH 2/2] adding_waiting_time_variable --- adafruit_bmp3xx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_bmp3xx.py b/adafruit_bmp3xx.py index c928383..96b5e9d 100644 --- a/adafruit_bmp3xx.py +++ b/adafruit_bmp3xx.py @@ -69,6 +69,7 @@ def __init__(self): self._read_coefficients() self.reset() self.sea_level_pressure = 1013.25 + self._wait_time = 0.002 # change this value to have faster reads if needed """Sea level pressure in hPa.""" @property @@ -144,7 +145,7 @@ def _read(self): # Wait for *both* conversions to complete while self._read_byte(_REGISTER_STATUS) & 0x60 != 0x60: - time.sleep(0.002) + time.sleep(self._wait_time) # Get ADC values data = self._read_register(_REGISTER_PRESSUREDATA, 6)