SI7021 temperature and humidity sensor
Constructor to create si7021 sensor
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are: Current properties are:
I2C address of the si7021 (default 0x40)
I2C bus (default 0)
obj - created SI7020 object
a = arduino()
sensor = si7021(a)
Read the temperature
obj - the si7021 object
C - read temperature in deg C.
timestamp - timestamp when read
a = arduino()
s = si7021(a)
# get temp
temp = s.readTemperature()
See also: si7021.
Read the relative humidity
obj - the si7021 object
relH - relative humidity as a percentage (0 - 100.0)
timestamp - timestamp when read
Read the sensor data
obj - the si2071 sensor object
H - humidity reading from sensor.
C - temperature reading from sensor.
timestamp - timestamp when read
overrun - overrun flag.
readings - table structure with fields for Timestamp, Temperature and Humidity.
Read the sensor info
dsObj - the si7021 object
inf - structure containing the sensor information.
Structure fields are:
Chip firmware version
sensor id value
String for detected chip type
Flush sensor data
obj - the sensor object
None
Release the resources of the sensor
obj - the sensor object
None
Package: arduino