-
Notifications
You must be signed in to change notification settings - Fork 24
Adopt changes from the BME280 library #13
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
Conversation
Add Normal mode for continuous reading
This causes a change in behavior when var1 == 0. Previously, the property would return 0. Now it returns _BMP280_PRESSURE_MIN_HPA. The new behavior is the same as in the Bosch C driver. This also makes pylint happy by remove the 'return after else'
ping. Is there something I can do to help get this reviewed? This is basically just the same code that was already accepted in the BME280 library, minus the humidity property (since the BMP280 doesn't have that). |
@siddacious wanna take a look at this PR & test it? |
Sure |
@ladyada I just checked and I don't have a BME280 but I'll get one ordered |
@siddacious, this PR is for the BMP280. |
@makermelissa thanks for the catch. I also do not have one of those |
I can take a look then. I have both. |
@makermelissa ok, sounds good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested both examples on SPI and I2C. Just one small change.
examples/bmp280_normal_mode.py
Outdated
# OR create library object using our Bus SPI port | ||
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO) | ||
#bme_cs = digitalio.DigitalInOut(board.D10) | ||
#bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, bme_cs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this was left as bme280. Just need to change it to:
bmp_cs = digitalio.DigitalInOut(board.D10)
bmp280 = adafruit_bmp280.Adafruit_BMP280_SPI(spi, bmp_cs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed that with commit b9e41db
Looks good. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP280 to 3.1.0 from 3.0.10: > Merge pull request adafruit/Adafruit_CircuitPython_BMP280#13 from jraber/master Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.0.0 from 2.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#31 from caternuson/iss30
hiya this broke trinket m0 and other non-express builds. do we need to use |
I can test this tonight and see if I can figure how to get it working with the trinket. |
Removing |
Adopt changes from the BME280 library to enable Normal mode, IIR Filters, & Overscan
I applied the changes that were applied to the BME280 library to the BMP280.