代码: 全选
from machine import I2C, Pin
from time import sleep_ms
from sht3x_16bit import SHT3x
i2c = I2C(0, sda=Pin(21), scl = Pin(22))
sht30 = SHT3x(i2c)
while True:
sht30.measure()
print(sht30.ht())
sleep_ms(1000)
代码: 全选
from machine import I2C, Pin
from time import sleep_ms
from sht3x_16bit import SHT3x
i2c = I2C(0, sda=Pin(21), scl = Pin(22))
sht30 = SHT3x(i2c)
while True:
sht30.measure()
print(sht30.ht())
sleep_ms(1000)