Component: Temp / Humidity (Grove 101020212) (101020212) (Environmental)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 2.0
Category Environmental


Temp / Humidity (Grove 101020212) component

Humidity and temperature sensor using an SHT31 IC connected via I2C. On screen GUI allows temperature and humidity values to be simulated, and will show all I2C communication in a console window.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Grove_SHT31.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Grove_SHT31.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetHumidityData

Fc9-comp-macro.png GetHumidityData
Returns the raw register pair value 
Fc9-u16-icon.png - UINT Return


GetHumidityInt

Fc9-comp-macro.png GetHumidityInt
returns the relative Humidity reading as an integer value 
Fc9-s16-icon.png - INT Return


GetHumidityReal

Fc9-comp-macro.png GetHumidityReal
returns the Humidity reading as a float value 
Fc9-f32-icon.png - FLOAT Return


GetTemperatureData

Fc9-comp-macro.png GetTemperatureData
Returns the raw register pair value 
Fc9-u16-icon.png - UINT Return


GetTemperatureInt

Fc9-comp-macro.png GetTemperatureInt
Return temperature reading as an integer value in degrees C 
Fc9-s16-icon.png - INT Return


GetTemperatureReal

Fc9-comp-macro.png GetTemperatureReal
Return temperature reading as a float value in degrees C 
Fc9-f32-icon.png - FLOAT Return


Initialise

Fc9-comp-macro.png Initialise
Configures the I2C peripheral and puts the sensor into one shot mode ready to be sampled. Must be called before calling any of the other component macros. Returns 1 if the sensor has been intialised correctly, else returns 0. 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Address
Selects the correct device address based on the ADDR pin connection to VDD or VSS. 
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-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
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-conn-icon.png Simulation
Fc9-type-7-icon.png Simulation Comms