RobTillaart / SHT85

Arduino library for the SHT85 temperature and humidity sensor
MIT License
11 stars 4 forks source link

Create derived classes for SHT40/41/45 #15

Closed RobTillaart closed 1 year ago

RobTillaart commented 1 year ago

From datasheet, temperature formula is identical, humidity is not CRC8 is identical.

t_ticks = rx_bytes[0] * 256 + rx_bytes[1]
rh_ticks = rx_bytes[3] * 256 + rx_bytes[4]
t_degC = -45 + 175 * t_ticks/65535
rh_pRH = -6 + 125 * rh_ticks/65535    <<<<<<<<<<<<<<<<<<<
if (rh_pRH > 100):
rh_pRH = 100
if (rh_pRH < 0):
rh_pRH = 0

maybe first derive an SHT4x and then all underneath? (less replication)


Commands seem to be different...

RobTillaart commented 1 year ago

Too different so create its own repo.