parent
0236cb9c7d
commit
779c4bdef1
13
test.py
13
test.py
|
@ -11,17 +11,8 @@ import time
|
|||
count = 2
|
||||
i2c = busio.I2C(board.SCL, board.SDA)
|
||||
while True:
|
||||
count += 1
|
||||
if count != 77:
|
||||
print(hex(count))
|
||||
try:
|
||||
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=hex(count))
|
||||
print(bmp280.temperature)
|
||||
exit()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
exit()
|
||||
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=0x4c)
|
||||
print(bmp280.temperature)
|
||||
# print(get_temperature()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue