Difference between revisions of "Component: Temp / Humidity (HTS221) (Environmental)"

From Flowcode Help
Jump to navigationJump to search
Line 15: Line 15:
 
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
 
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
  
==Component Pack==
+
==Component Source Code==
  
SENSORS
+
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Humidity_HTS221.fcfx FC_Comp_Source_Humidity_HTS221.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 32: Line 34:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 192: Line 196:
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 +
|-
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Properties
 
|-
 
|-
 
|-
 
|-
Line 198: Line 206:
 
|-
 
|-
 
| colspan="2" |  
 
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
Line 234: Line 246:
 
| colspan="2" | Baud rate to be used 
 
| colspan="2" | Baud rate to be used 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" | Scope Traces
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
 
| colspan="2" | 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. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
 
| colspan="2" | Selects if the console data is automatically generated or not 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | API
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
 
|-
 
|-
 
|-
 
|-

Revision as of 17:47, 9 November 2022

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

Component Source Code

Please click here for the component source code: FC_Comp_Source_Humidity_HTS221.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png ReadHumidityInt
Samples the humidity from the sensor and returns the relative humidity reading as a integer byte from 0 to 100 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadTemperatureInt
Samples the temperature from the sensor and returns the reading in degrees C as an integer from -40 to 120. 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png 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. 
Fc9-bool-icon.png - BOOL Active
0 = Off (Sensor Reading Available) / 1 = On (Sensor Reading Disabled) 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadHumidityReal
Samples the humidity from the sensor and returns the relative humidity reading as a float from 0.0 to 100.0. 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png ReadRegister
Reads an 8-bit value from one of the registers onboard the sensor IC. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadTemperatureReal
Samples the temperature from the sensor and returns the reading in degrees C as a float from -40.0 to 120.0. 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png WriteRegister
Writes a value to a register on the sensor IC. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Configures the I2C peripheral ready for communications. 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Sensor Properties
Fc9-type-16-icon.png Data Rate
 
Fc9-conn-icon.png I2C Properties
Fc9-type-14-icon.png Address
 
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-7-icon.png 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.  
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Sim Type