init weather station
This commit is contained in:
commit
551367cc83
12 changed files with 29 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
CIRCUITPY/settings.toml
|
||||||
3
CIRCUITPY/boot_out.txt
Executable file
3
CIRCUITPY/boot_out.txt
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
Adafruit CircuitPython 8.2.0 on 2023-07-05; Raspberry Pi Pico with rp2040
|
||||||
|
Board ID:raspberry_pi_pico
|
||||||
|
UID:E6605838837E9433
|
||||||
18
CIRCUITPY/code.py
Executable file
18
CIRCUITPY/code.py
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
import board
|
||||||
|
import time
|
||||||
|
import busio
|
||||||
|
from adafruit_bme280 import basic as adafruit_bme280
|
||||||
|
|
||||||
|
i2c = busio.I2C(scl=board.GP15, sda=board.GP14)
|
||||||
|
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c, 0x76)
|
||||||
|
# location's pressure (hPa) QNH at sea level
|
||||||
|
bme280.sea_level_pressure = 1016 # value from https://metar-taf.com/EDDM
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print("\nTemperature: %0.1f C" % bme280.temperature)
|
||||||
|
print("Humidity: %0.1f %%" % bme280.relative_humidity)
|
||||||
|
print("Pressure: %0.1f hPa" % bme280.pressure)
|
||||||
|
print("Altitude = %0.2f meters" % bme280.altitude)
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
|
||||||
BIN
CIRCUITPY/lib/._adafruit_bme280
Executable file
BIN
CIRCUITPY/lib/._adafruit_bme280
Executable file
Binary file not shown.
BIN
CIRCUITPY/lib/adafruit_bme280/.___init__.py
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/.___init__.py
Executable file
Binary file not shown.
BIN
CIRCUITPY/lib/adafruit_bme280/._basic.mpy
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/._basic.mpy
Executable file
Binary file not shown.
BIN
CIRCUITPY/lib/adafruit_bme280/._protocol.mpy
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/._protocol.mpy
Executable file
Binary file not shown.
0
CIRCUITPY/lib/adafruit_bme280/__init__.py
Executable file
0
CIRCUITPY/lib/adafruit_bme280/__init__.py
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/basic.mpy
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/basic.mpy
Executable file
Binary file not shown.
BIN
CIRCUITPY/lib/adafruit_bme280/protocol.mpy
Executable file
BIN
CIRCUITPY/lib/adafruit_bme280/protocol.mpy
Executable file
Binary file not shown.
4
rsync-exclude.txt
Normal file
4
rsync-exclude.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
.Trashes
|
||||||
|
.fseventsd
|
||||||
|
.metadata_never_index
|
||||||
|
._code.py
|
||||||
3
sync.sh
Executable file
3
sync.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rsync -avc --exclude-from=./rsync-exclude.txt /Volumes/CIRCUITPY/ ./CIRCUITPY/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue