Component: Temperature (TMP117) (Environmental)

From Flowcode Help
Revision as of 14:13, 22 October 2025 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Environmental


Temperature (TMP117) component

The TMP117 provides high accuracy temperature monitoring via a digital I2C interface.

Detailed description

No detailed description exists yet for this component

Examples

A basic example which moves an object on the panel. When the object is in range of the sensor the sensor output goes high, otherwise the sensor output goes low. FC6 Icon.png PhotoTransistorDemo






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Sets up the I2C ready for operation and initialises the sensor with the default settings. Returns 1 if the device is correctly identified. 
Fc9-bool-icon.png - BOOL Return


ReadRegister

Fc9-comp-macro.png ReadRegister
 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u16-icon.png - UINT Return


ReadTemperature

Fc9-comp-macro.png ReadTemperature
Reads the temperature as a floating point value in Celcius. 
Fc9-f32-icon.png - FLOAT Return


ReadTemperatureF

Fc9-comp-macro.png ReadTemperatureF
Reads the temperature as a floating point value in Fahrenheit 
Fc9-f32-icon.png - FLOAT Return


SetMode

Fc9-comp-macro.png SetMode
Sets the mode of the sensor and therefore the amount of power consumed by the sensor. 
Fc9-u8-icon.png - BYTE Mode
0=Shutdown, 3=Triggered, 7=Continuous 
Fc9-void-icon.png - VOID Return


SetTemperatureOffset

Fc9-comp-macro.png SetTemperatureOffset
Allows an offset to be written to offset the output temperature 
Fc9-f32-icon.png - FLOAT Offset
Temperature offset in degrees C 
Fc9-void-icon.png - VOID Return


WriteRegister

Fc9-comp-macro.png WriteRegister
 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u16-icon.png - UINT Value
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
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 Settings
Fc9-type-16-icon.png Address A0
Sets the I2C device address based on the state of the device AD0 pin 
Fc9-type-16-icon.png Default Mode
Sets the default mode of the sensor on initialise. Can be overridden using the SetMode macro. 
Fc9-type-16-icon.png Standby Time
Sets the amount of time to wait between samples to save power. 
Fc9-type-16-icon.png Averaging Count
Sets the number of samples used for each averaging period. Can be overridden using the SetAveragingCount macro. 
Fc9-type-16-icon.png Alert Polarity
 
Fc9-type-16-icon.png Alert Type
 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms
 
Fc9-type-7-icon.png 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. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png API
Specifies the API component on the panel to interact with to provide comms simulation. 

Component Source Code

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

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