Skip to content

Update Adafruit IO Air Quality Sensor Code #1466

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 1 commit into from
Mar 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Adafruit_IO_Air_Quality/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from adafruit_io.adafruit_io import IO_HTTP
from simpleio import map_range
from adafruit_pm25.uart import PM25_UART

# Uncomment below for PMSA003I Air Quality Breakout
# from adafruit_pm25.i2c import PM25_I2C
import adafruit_bme280
Expand Down Expand Up @@ -146,7 +147,11 @@ def read_bme(is_celsius=False):
feed_temperature = io.get_feed("air-quality-sensor.temperature")

# Set up location metadata from secrets.py file
location_metadata = (secrets["latitude"], secrets["longitude"], secrets["elevation"])
location_metadata = {
"lat": secrets["latitude"],
"lon": secrets["longitude"],
"ele": secrets["elevation"],
}

elapsed_minutes = 0
prv_mins = 0
Expand Down