Difference between revisions of "Component: Temperature Sensor (101020015) (Grove)"

From Flowcode Help
Jump to navigationJump to search
(XML import - Pre 8.0 release)
 
 
Line 20: Line 20:
 
This resistance value alters the output of a voltage divider which is measured by an analog input pin and converted to a temperature value.  
 
This resistance value alters the output of a voltage divider which is measured by an analog input pin and converted to a temperature value.  
 
The operating range is -40 to 125°C , with an accuracy of 1.5°C .
 
The operating range is -40 to 125°C , with an accuracy of 1.5°C .
 +
 +
Make sure the temperature sensor is connected to the right channel in flowcode. Also, you must know that the readings taken will be in °C. There are different macros that can be used to get the temperature reading as a floating point as a whole integer.
  
 
==Examples==
 
==Examples==

Latest revision as of 14:20, 7 September 2018


Author Matrix Ltd
Version 1.0 (Release)
Category Grove


Image Temperature Sensor (101020015) component

Temperature Sensor uses a thermistor to measure ambient temperature. The resistance of thermistor changes based on ambient temperature. This resistance value alters the output of a voltage divider which is measured by an analog input pin and converted to a temperature value. The operating range is -40 to 125°C , with an accuracy of 1.5°C .

Make sure the temperature sensor is connected to the right channel in flowcode. Also, you must know that the readings taken will be in °C. There are different macros that can be used to get the temperature reading as a floating point as a whole integer.

Examples

No additional examples


Downloadable macro reference

GetTempInt

Reads the temperature of the temperature sensor and returns as an integer value.

Parameters

This macro has no parameters


Return value

INT


GetTempFloat

Reads the temperature of the temperature sensor and returns as a floating point value.

Parameters

This macro has no parameters


Return value

FLOAT


Simulation macro reference

This component does not contain any simulation macros


Property reference

Tang Color

This property is of type Color picker and can be referenced with the variable name tang_col.

Colour of the moving part of the slider.

Marker Color

This property is of type Color picker and can be referenced with the variable name mark_col.

Colour of the marker line across the slider tang.

Scope Traces

This property is of type True or false and can be referenced with the variable name ScopeTraces.

Selects if the scope traces are automatically generated or not

Channel

This property is of type Single analog pin and can be referenced with the variable name channel.

Analogue input channel - which pin is the analogue input conected to?

VRef voltage

This property is of type Signed integer and can be referenced with the variable name vrefvol.

Used by the GetVoltage or GetString component macros to take an ADC reading and convert it into a Voltage.

+VRef voltage x 10mV

Default 500 = 5.0V

VRef option

This property is of type Fixed list of ints and can be referenced with the variable name vrefop.

Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage.

VDD - Defines the microcontrollers power supply pin as the max reference,

VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.

Conversion speed

This property is of type Fixed list of ints and can be referenced with the variable name convspd.

Clock setting to select how fast the ADC peripheral will perform an ADC conversion.

The FRC setting is based on a RC time base and so will vary with temperature and pressure.

Other settings are generally based on divisions of the master clock.

Aquisition cycles

This property is of type Signed integer and can be referenced with the variable name actime.

Number of micro seconds to wait for the ACD input to charge before starting the analogue sample.

Bit Depth

This property is of type Signed integer and can be referenced with the variable name bits.

Maximum number of digital bits the ADC can sample.

8 bit = ADC range 0 - 255

10 bit = ADC range 0 - 1023

12 bit = ADC range 0 - 4095