Difference between revisions of "Component: Analogue Temp Sensors (Environmental)"
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 56: | Line 56: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 63: | Line 65: | ||
==Macro reference== | ==Macro reference== | ||
− | === | + | ===GetTempFloatC=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloatC''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Value of the temperature in deg C 999.9 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
Line 77: | Line 79: | ||
− | === | + | ===GetTempFloatF=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempFloatF''' |
|- | |- | ||
− | | colspan="2" | Value of | + | | colspan="2" | Value of the temperature in deg F 999,9 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | === | + | ===GetTempIntCX10=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempIntCX10''' |
|- | |- | ||
− | | colspan="2" | Value of integer temperature in deg | + | | colspan="2" | Value of integer temperature in deg C x10 E.g 22.5C will give the result of 225 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
Line 105: | Line 107: | ||
− | === | + | ===GetTempIntFX10=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempIntFX10''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Value of integer temperature in deg F x10 E.g 62.5F will give the result of 625 This allows more contol if using integers to save memory 9999 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
Line 119: | Line 121: | ||
− | === | + | ===GetTempStringC=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempStringC''' |
|- | |- | ||
− | | colspan="2" | String value of integer temperature in | + | | colspan="2" | String value of integer temperature in deg C to one decimal place. E.g 22.5 999,9 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
Line 133: | Line 135: | ||
− | === | + | ===GetTempStringF=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTempStringF''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | String value of integer temperature in degF to one decimal place. E.g 70.2 999,9 = temperature outside of sensor range |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | === | + | ===IntValueADC=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IntValueADC''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | The Integer ADC value of the sensor output volttage |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | === | + | ===VoltageADC=== |
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''VoltageADC''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only. |
|- | |- | ||
|- | |- |
Revision as of 11:59, 3 February 2023
Author | Medelec35 |
Version | 1.0 |
Category | Environmental |
Contents
Analogue Temp Sensors component
A range of the most popular temperature analogue sensors which are: AD22100, AD22103, LM135, LM235, LM335, LM34, LM35, LM60, MCP9700, MCP9701, TC1047, TMP35, TMP36, TMP37 & TSIC301. Uses a single ADC pin which will allow you to display the temperature in C or F. If your sensor is not listed, there is a Custom option. You will be able to enter the scale factor, offset voltage, Temperature Compensation, min and maximum temperatures If the temperature is outside the min and max values, then 999.9 will be displayed.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/Analogue_Temperature_Sensors.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetTempFloatC
![]() |
GetTempFloatC |
Value of the temperature in deg C 999.9 = temperature outside of sensor range | |
![]() |
Return |
GetTempFloatF
![]() |
GetTempFloatF |
Value of the temperature in deg F 999,9 = temperature outside of sensor range | |
![]() |
Return |
GetTempIntCX10
GetTempIntFX10
GetTempStringC
![]() |
GetTempStringC |
String value of integer temperature in deg C to one decimal place. E.g 22.5 999,9 = temperature outside of sensor range | |
![]() |
Return |
GetTempStringF
![]() |
GetTempStringF |
String value of integer temperature in degF to one decimal place. E.g 70.2 999,9 = temperature outside of sensor range | |
![]() |
Return |
IntValueADC
![]() |
IntValueADC |
The Integer ADC value of the sensor output volttage | |
![]() |
Return |
VoltageADC
![]() |
VoltageADC |
Calculates what the approximate voltage should be based on Vref, Scale factor, Offset. For TSIC301, based on Max temp and Min temp only. | |
![]() |
Return |