next temp test

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-10 19:49:07 +02:00
parent 624274051e
commit 34403f2c79
1 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,9 @@ import adafruit_bmp280
import time import time
def get_temperature(): def get_temperature():
i2c = busio.I2C(board.SCL, board.SDA)
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=0x76)
return bmp280.temperature
while True: while True:
print(get_temperature()) print(get_temperature())