Skip to content

v0.2.0

Compare
Choose a tag to compare
@fhunleth fhunleth released this 14 Jul 20:47
· 15 commits to main since this release

Changed

  • SHT4X regularly polls temperature and humidity at 5 second intervals
    (configurable). Regular polling is required for temperature compensation
    algorithms.
  • The SHT4X.measure/1 function is now SHT4X.get_sample/1 to reflect that it
    returns the latest sample rather than polling the sensor. The SHT4X.Measurement
    struct contains a timestamp and quality information to indicate how stale it
    is. Staleness could be due to communication issues with the sensor or just
    waiting for the next poll time.
  • The sensor's serial number is not polled on init. This means that I2C failures
    or retry delays won't delay or fail startup. They likely will affect the
    regular polling if they don't resolve themselves.

Added

  • SHT4X.serial_number/1 to get the sensor's unique serial number
  • The sensor is immediately polled for a temperature. Previously the first
    temperature measurement was delayed until the interval timer expired (default 5
    seconds).