init weather station

This commit is contained in:
Travis Shears 2023-07-26 09:35:30 +02:00
commit 551367cc83
Signed by: travisshears
GPG key ID: D4C2E4DFAB8BABF8
12 changed files with 29 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
CIRCUITPY/settings.toml

3
CIRCUITPY/boot_out.txt Executable file
View 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
View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

4
rsync-exclude.txt Normal file
View file

@ -0,0 +1,4 @@
.Trashes
.fseventsd
.metadata_never_index
._code.py

3
sync.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
rsync -avc --exclude-from=./rsync-exclude.txt /Volumes/CIRCUITPY/ ./CIRCUITPY/