Update code.py

This commit is contained in:
Liz 2024-06-19 15:45:38 -04:00 committed by GitHub
parent 53dacbbe9d
commit bb67c12bde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,8 @@ import adafruit_sht4x
i2c = board.I2C() # uses board.SCL and board.SDA
sht = adafruit_sht4x.SHT4x(i2c)
print("Found SHT4x with serial number", hex(sht.serial_number))
# overflow issue with sht41, not present with sht45
# print("Found SHT4x with serial number", hex(sht.serial_number))
sht.mode = adafruit_sht4x.Mode.NOHEAT_HIGHPRECISION
print("Current mode is: ", adafruit_sht4x.Mode.string[sht.mode])