I need some guidance on the "SHT-30 Mesh-protected Weather-proof Temperature/Humidity Sensor".
1. Can I simply use the following short code to read values from the sensor? See, https://learn.adafruit.com/adafruit-sht ... cuitpython
Code: Select all
import board
import busio
import adafruit_sht31d
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_sht31d.SHT31D(i2c)
print('Humidity: {0}%'.format(sensor.relative_humidity))
print('Temperature: {0}C'.format(sensor.temperature))
Code: Select all
import smbus
import time
bus = smbus.SMBus(1)
bus.write_i2c_block_data(0x44, 0x2C, [0x06])
......
Thank you very much.