Jump to content

Component: Temp / Humidity (HTS221) (Environmental)

From Flowcode Help
Revision as of 13:30, 17 November 2021 by Wiki bot (talk | contribs)
Author Matrix TSL
Version 1.0
Category Environmental


Temp / Humidity component

A temperature and relative humidity sensor allowing the ambient temperature and relative humidity to be monitored digitally. Humidity Range = 0% - 100% +/- 3.5% Temperature Range = -40 - 120 Degrees C +/- 0.5 Degrees C

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

ReadHumidityInt
Samples the humidity from the sensor and returns the relative humidity reading as a integer byte from 0 to 100 
- BYTE Return


DataAvailable
Checks to see if new sensor data is available. Returns 0 if no new data is available. Returns 1 if new Temperature data is available. Returns 2 if new Humidity data is available. Returns 3 if new Temp and Humidity data is available. 
- BYTE Return


ReadTemperatureInt
Samples the temperature from the sensor and returns the reading in degrees C as an integer from -40 to 120. 
- INT Return


ControlHeater
Controls the in-built heater element to speed up sensor recovery time in case of condensation. Humidity and temperature cannot be read while Heater is active. 
- BOOL Active
0 = Off (Sensor Reading Available) / 1 = On (Sensor Reading Disabled) 
- VOID Return


ReadHumidityReal
Samples the humidity from the sensor and returns the relative humidity reading as a float from 0.0 to 100.0. 
- FLOAT Return


ReadRegister
Reads an 8-bit value from one of the registers onboard the sensor IC. 
- BYTE Address
 
- BYTE Return


ReadTemperatureReal
Samples the temperature from the sensor and returns the reading in degrees C as a float from -40.0 to 120.0. 
- FLOAT Return


WriteRegister
Writes a value to a register on the sensor IC. 
- BYTE Address
 
- BYTE Data
 
- VOID Return


Initialise
Configures the I2C peripheral ready for communications. 
- BYTE Return



Property reference

Properties
Data Rate
 
Address
 
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Scope Traces
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window. 
Console Data
Selects if the console data is automatically generated or not 
API
 
Connections
Simulations
Sim Type