parent
5e8b31af21
commit
cdfe165932
2
test.py
2
test.py
|
@ -12,12 +12,14 @@ count = 3
|
||||||
i2c = busio.I2C(board.SCL, board.SDA)
|
i2c = busio.I2C(board.SCL, board.SDA)
|
||||||
while True:
|
while True:
|
||||||
if count != 77:
|
if count != 77:
|
||||||
|
print(hex(count))
|
||||||
try:
|
try:
|
||||||
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=hex(count))
|
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, address=hex(count))
|
||||||
print(bmp280.temperature)
|
print(bmp280.temperature)
|
||||||
exit()
|
exit()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
count + 1
|
||||||
else:
|
else:
|
||||||
exit()
|
exit()
|
||||||
# print(get_temperature()
|
# print(get_temperature()
|
||||||
|
|
Loading…
Reference in New Issue