add: in production

This commit is contained in:
Charles Hathaway
2023-10-03 16:17:34 -07:00
parent dfb8584910
commit d16d1e0ac5
12 changed files with 339 additions and 57 deletions
+17
View File
@@ -0,0 +1,17 @@
import bme280
import smbus2
from time import sleep
port = 1
address = 0x77 # Adafruit BME280 address. Other BME280s may be different
bus = smbus2.SMBus(port)
bme280.load_calibration_params(bus,address)
while True:
bme280_data = bme280.sample(bus,address)
humidity = bme280_data.humidity
pressure = bme280_data.pressure
ambient_temperature = bme280_data.temperature
print(humidity, pressure, ambient_temperature)
sleep(1)