CircuitsSim.Device.SHT4X (circuits_sim v0.1.2)
View SourceSensirion SHT4x sensors
Typically found at 0x44 See the datasheet for details.
Call set_humidity_rh/3
and set_temperature_c/3
to change the state of the sensor.
Summary
Functions
Inject CRC errors into the next n CRC fields
Experimental API to return I2C errors on read/read_writes
Types
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
@spec inject_crc_errors(String.t(), Circuits.I2C.address(), non_neg_integer()) :: :ok
Inject CRC errors into the next n CRC fields
Currently all messages have 2 CRC fields, so this will cause CRC mismatch errors on the next n/2 messages.
@spec set_broken(String.t(), Circuits.I2C.address(), nil | {:error, any()}) :: :ok
Experimental API to return I2C errors on read/read_writes
Set the 3rd argument to an error tuple to be returned or nil
to work
normally.
@spec set_humidity_rh(String.t(), Circuits.I2C.address(), number()) :: :ok
@spec set_temperature_c(String.t(), Circuits.I2C.address(), number()) :: :ok