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