diff --git a/README.rst b/README.rst index 97ae64d..823cbf1 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ Introduction :target: https://github.com/psf/black :alt: Code Style: Black -Helper library for the SCD30 e-CO2 sensor +Helper library for the SCD30 CO2 sensor Dependencies @@ -75,7 +75,7 @@ Usage Example # the values, to ensure current readings. if scd.data_available: print("Data Available!") - print("eCO2:", scd.eCO2, "PPM") + print("CO2:", scd.CO2, "PPM") print("Temperature:", scd.temperature, "degrees C") print("Humidity:", scd.relative_humidity, "%%rH") print("") diff --git a/adafruit_scd30.py b/adafruit_scd30.py index 63bbebc..95fc9fe 100644 --- a/adafruit_scd30.py +++ b/adafruit_scd30.py @@ -5,7 +5,7 @@ `adafruit_scd30` ================================================================================ -Helper library for the SCD30 e-CO2 sensor +Helper library for the SCD30 CO2 sensor * Author(s): Bryan Siepert @@ -15,7 +15,7 @@ **Hardware:** -* `Adafruit SCD30 Breakout `_ +* `Adafruit SCD30 Breakout `_ **Software and Dependencies:** @@ -50,7 +50,7 @@ class SCD30: - """CircuitPython helper class for using the SCD30 e-CO2 sensor""" + """CircuitPython helper class for using the SCD30 CO2 sensor""" def __init__(self, i2c_bus, ambient_pressure=0, address=SCD30_DEFAULT_ADDR): if ambient_pressure != 0: @@ -71,7 +71,7 @@ def __init__(self, i2c_bus, ambient_pressure=0, address=SCD30_DEFAULT_ADDR): # cached readings self._temperature = None self._relative_humidity = None - self._e_co2 = None + self._co2 = None def reset(self): """Perform a soft reset on the sensor, restoring default values""" @@ -82,7 +82,7 @@ def reset(self): def measurement_interval(self): """Sets the interval between readings in seconds. The interval value must be from 2-1800 - **NOTE** This value will be saved and will not be reset on boot or by callint `reset`.""" + **NOTE** This value will be saved and will not be reset on boot or by calling `reset`.""" return self._read_register(_CMD_SET_MEASUREMENT_INTERVAL) @@ -101,7 +101,7 @@ def self_calibration_enabled(self): **NOTE**: Enabling self calibration will override any values set by specifying a `forced_recalibration_reference` - **NOTE** This setting will be saved and will not be reset on boot or by callint `reset`.""" + **NOTE** This setting will be saved and will not be reset on boot or by calling `reset`.""" return self._read_register(_CMD_AUTOMATIC_SELF_CALIBRATION) == 1 @@ -133,7 +133,7 @@ def altitude(self): this value adjusts the CO2 measurement calculations to account for the air pressure's effect on readings. - **NOTE** This value will be stored and will not be reset on boot or by callint `reset`.""" + **NOTE** This value will be stored and will not be reset on boot or by calling `reset`.""" return self._read_register(_CMD_SET_ALTITUDE_COMPENSATION) @altitude.setter @@ -143,10 +143,10 @@ def altitude(self, altitude): @property def temperature_offset(self): """Specifies the offset to be added to the reported measurements to account for a bias in - the measured signal. Value is in degrees Celcius with a resolution of 0.01 degrees and a + the measured signal. Value is in degrees Celsius with a resolution of 0.01 degrees and a maximum value of 655.35 C - **NOTE** This value will be saved and will not be reset on boot or by callint `reset`.""" + **NOTE** This value will be saved and will not be reset on boot or by calling `reset`.""" raw_offset = self._read_register(_CMD_SET_TEMPERATURE_OFFSET) return raw_offset / 100.0 @@ -174,13 +174,13 @@ def forced_recalibration_reference(self, reference_value): self._send_command(_CMD_SET_FORCED_RECALIBRATION_FACTOR, reference_value) @property - def eCO2(self): # pylint:disable=invalid-name + def CO2(self): # pylint:disable=invalid-name """Returns the CO2 concentration in PPM (parts per million) **NOTE** Between measurements, the most recent reading will be cached and returned.""" if self.data_available: self._read_data() - return self._e_co2 + return self._co2 @property def temperature(self): @@ -244,7 +244,7 @@ def _read_data(self): if not crcs_good: raise RuntimeError("CRC check failed while reading data") - self._e_co2 = unpack(">f", self._buffer[0:2] + self._buffer[3:5])[0] + self._co2 = unpack(">f", self._buffer[0:2] + self._buffer[3:5])[0] self._temperature = unpack(">f", self._buffer[6:8] + self._buffer[9:11])[0] self._relative_humidity = unpack( ">f", self._buffer[12:14] + self._buffer[15:17] diff --git a/docs/examples.rst b/docs/examples.rst index 884594b..5cff903 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -14,4 +14,4 @@ Experiment with different tuning parameters and settings .. literalinclude:: ../examples/scd30_tuning_knobs.py :caption: examples/scd30_tuning_knobs.py - :linenos: \ No newline at end of file + :linenos: diff --git a/examples/scd30_simpletest.py b/examples/scd30_simpletest.py index 942436c..fac085e 100644 --- a/examples/scd30_simpletest.py +++ b/examples/scd30_simpletest.py @@ -14,7 +14,7 @@ # the values, to ensure current readings. if scd.data_available: print("Data Available!") - print("eCO2:", scd.eCO2, "PPM") + print("CO2:", scd.CO2, "PPM") print("Temperature:", scd.temperature, "degrees C") print("Humidity:", scd.relative_humidity, "%%rH") print("") diff --git a/examples/scd30_tuning_knobs.py b/examples/scd30_tuning_knobs.py index dfc1b7f..c9c4fc6 100644 --- a/examples/scd30_tuning_knobs.py +++ b/examples/scd30_tuning_knobs.py @@ -31,7 +31,7 @@ data = scd.data_available if data: print("Data Available!") - print("eCO2:", scd.eCO2, "PPM") + print("CO2:", scd.CO2, "PPM") print("Temperature:", scd.temperature, "degrees C") print("Humidity::", scd.relative_humidity, "%%rH") print("") diff --git a/setup.py b/setup.py index 3164675..6e2f1a2 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ name="adafruit-circuitpython-scd30", use_scm_version=True, setup_requires=["setuptools_scm"], - description="Helper library for the SCD30 e-CO2 sensor", + description="Helper library for the SCD30 CO2 sensor", long_description=long_description, long_description_content_type="text/x-rst", # The project's main homepage.