Skip to content

Commit

Permalink
repair error sensor when booting
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine3000 committed Aug 7, 2023
1 parent aa8848f commit 01f8680
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion software/modules/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
if SENSOR_MODEL == "aht20":
import adafruit_ahtx0

SENSOR_I2C = busio.I2C(board.GP13, board.GP12)




def sensor_start():
try:
SENSOR_I2C = busio.I2C(board.GP13, board.GP12)
except Exception as e:
print(e)
try:
if SENSOR_MODEL == "sht31d":
modules.globals.SENSOR = adafruit_sht31d.SHT31D(SENSOR_I2C)
Expand Down

0 comments on commit 01f8680

Please sign in to comment.