Skip to content

Add relative_humidity property #34

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
Nov 25, 2020
Merged

Add relative_humidity property #34

merged 2 commits into from
Nov 25, 2020

Conversation

anecdata
Copy link
Member

Same change as in adafruit/Adafruit_CircuitPython_BME280#40:

Almost all Adafruit libraries with a humidity sensor use relative_humidity as the name of the property for sensor humidity:
SHT31D, Si7021, HTU21D, AM2320, HTS221, AHTx0, and also now BME280.

This PR adds a relative_humidity property to BME680 (which simply accesses the humidity property) to normalize the API and allow users to remove conditional processing in environments where different humidity sensors may be used.

This has been tested on an Adafruit BME680 (STEMMA QT version) running the library's simpletest.py code, modified to access the .relative_humidity property.

Test environment:
Adafruit CircuitPython 6.0.0 on 2020-11-16; Adafruit Feather M4 Express with samd51j19

@ladyada
Copy link
Member

ladyada commented Nov 25, 2020

can u also update the example and readme? we should stick to the convention which is relative_humidity

https://github.com/adafruit/Adafruit_CircuitPython_BME680/blob/master/examples/bme680_simpletest.py#L21

@ladyada
Copy link
Member

ladyada commented Nov 25, 2020

rad!

@anecdata
Copy link
Member Author

I'll update readme & examples on BME280 too (didn't before)

@ladyada ladyada merged commit d1e274d into adafruit:master Nov 25, 2020
@ladyada
Copy link
Member

ladyada commented Nov 25, 2020

yez!

@anecdata anecdata deleted the relative branch November 25, 2020 06:48
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 1, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_BME280 to 2.5.1 from 2.5.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME280#41 from anecdata/relative

Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 3.3.0 from 3.2.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME680#34 from anecdata/relative

Updating https://github.com/adafruit/Adafruit_CircuitPython_EMC2101 to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_EMC2101#1 from adafruit/pwm_freq

Updating https://github.com/adafruit/Adafruit_CircuitPython_FONA to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_FONA#10 from FoamyGuy/setuppy_fix_package

Updating https://github.com/adafruit/Adafruit_CircuitPython_WS2801 to 0.10.3 from 0.10.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_WS2801#18 from sgzmd/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_AWS_IOT to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_AWS_IOT#14 from mpechner/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_MLX90395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants