Skip to main content

Module sim

Module sim 

Source
Expand description

An SHT3x that is not there.

part answers the way an SHT3x at 22.5 C and 45 % does, and reporting at any temperature and humidity. It takes Sensirion’s 16-bit commands: every single-shot measurement, with or without clock stretching, and a fetch in periodic mode, answer with the reading and its CRCs; the status command answers with the status a part reports after a reset; a reset, the heater, and the rest answer with nothing.

Constants§

CELSIUS
The temperature part reports.
RELATIVE_HUMIDITY
The relative humidity part reports, as a percentage.

Functions§

part
An SHT3x answering at an address, reading CELSIUS and RELATIVE_HUMIDITY.
reporting
An SHT3x that reads what it is asked to.