toc Humidity and Temperature Sensor
Firmware & API Reference > Pycom Modules > Shields > SI7006A20

Humidity and Temperature Sensor

The Humidity and Temperature sensor provides values of relative humidity and external temperature.

Constructors

class SI7006A20(pycoproc = None, sda = ‘P22’, scl = ‘P21’)

Creates a SI7006A20 object. Constructor must be passed a Pycoproc or I2C object to successfully construct.

Methods

SI7006A20.humidity()

Read the relative humidity of the sensor. Returns a float with the percentage relative humidity.

SI7006A20.temperature()

Read the external temperature of the sensor. Returns a float with the temperature in degrees Celcius.

SI7006A20.dew_point()

Calculates the dew point temperature for the current temperature and humidity measurement.

SI7006A20.heater_control(state)

Enable or disable the internal heating element by setting state to True or False respectively. The internal heating element can be used to remove any condensation from the temperature sensor in order to get more accurate readings. Note that this will increase the temperature readings. By default, the heater is disabled.

SI7006A20.read_heater_reg()

Read the current setting of the internal heater. This will return a value between 0 and 15, where 0 corresponds with 3.09 mA and 15 with 94.20 mA. All values in between scale linearly

SI7006A20.write_heater_reg(heater_value)

Write the current setting of the internal heater. Use a value between 0 and 15, where 0 corresponds with 3.09 mA and 15 with 94.20 mA.

 

Previous Next