Arduino Toolkit - arduinosensor.SI7021
Methods
- :
obj =
SI7021(arObj) - :
obj =
SI7021(arObj,propertyname, propertyvalue ....)
Constructor to create SI7021 sensor
Inputs
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are: Current properties are:
- i2caddress
I2C address of the SI7021 (default 0x40)
Outputs
obj - created SI7020 object
Example
a = arduino() sensor = arduinosensor.SI7021(a)
- :
C =
temperature(dsObj) Read the temperature
Inputs
dsObj - the si7021 object
Outputs
C - read temperature in deg C.
Example
a = arduino() s = arduinosensor.SI7021(a) # get temp temp = s.temperature
See also: arduinosensor.SI7021.
- :
relH =
humidity(dsObj) Read the relative humidity
Inputs
dsObj - the si7021 object
Outputs
relH - relative humidity as a percentage (0 - 100.0)
- :
relH =
info(dsObj) Read the sensor info
Inputs
dsObj - the si7021 object
Outputs
inf - structure containing the sensor information.
Structure fields are:
- version
Chip firmware version
- id
sensor id1,id2 value
- type
String for detected chip type