remove magtag reference, update comments
This commit is contained in:
parent
d7cdb81494
commit
6994ee09d3
1 changed files with 4 additions and 2 deletions
|
|
@ -19,14 +19,15 @@ import adafruit_requests
|
||||||
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
|
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
|
||||||
|
|
||||||
|
|
||||||
# On MagTag, enable power to NeoPixels.
|
# enable power to NeoPixels.
|
||||||
# Remove these two lines on boards without board.NEOPIXEL_POWER.
|
|
||||||
np_power = digitalio.DigitalInOut(board.NEOPIXEL_POWER)
|
np_power = digitalio.DigitalInOut(board.NEOPIXEL_POWER)
|
||||||
np_power.switch_to_output(value=True)
|
np_power.switch_to_output(value=True)
|
||||||
|
|
||||||
|
# standard LED
|
||||||
builtin_led = digitalio.DigitalInOut(board.LED)
|
builtin_led = digitalio.DigitalInOut(board.LED)
|
||||||
builtin_led.switch_to_output(value=True)
|
builtin_led.switch_to_output(value=True)
|
||||||
|
|
||||||
|
# neopixel to use for status
|
||||||
status_pixel = neopixel.NeoPixel(
|
status_pixel = neopixel.NeoPixel(
|
||||||
board.NEOPIXEL, 1, brightness=0.1, pixel_order=neopixel.GRB, auto_write=True
|
board.NEOPIXEL, 1, brightness=0.1, pixel_order=neopixel.GRB, auto_write=True
|
||||||
)
|
)
|
||||||
|
|
@ -39,6 +40,7 @@ print("Found BME280")
|
||||||
# change this to match the location's pressure (hPa) at sea level
|
# change this to match the location's pressure (hPa) at sea level
|
||||||
bme280.sea_level_pressure = 1013.25
|
bme280.sea_level_pressure = 1013.25
|
||||||
|
|
||||||
|
# temperature converted to F
|
||||||
temperature = bme280.temperature * 9 / 5 + 32
|
temperature = bme280.temperature * 9 / 5 + 32
|
||||||
humidity = bme280.relative_humidity
|
humidity = bme280.relative_humidity
|
||||||
pressure = bme280.pressure
|
pressure = bme280.pressure
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue