Component: Temperature Infrared (Grove 101020062) (Environmental): Difference between revisions
Appearance
XML import |
No edit summary |
||
| Line 1: | Line 1: | ||
{| style="width:50%" | |||
{| | |||
|- | |- | ||
| width="20%" style="color: gray;" | Author | | width="20%" style="color:gray;" | Author | ||
| Matrix TSL | | Matrix TSL | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color:gray;" | Version | ||
| 1.2 | | 1.2 | ||
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color:gray;" | Category | ||
| Environmental | | Environmental | ||
|} | |} | ||
==Temperature Infrared component== | |||
The Grove Infrared Temperature Sensor allows none contact measurement of temperatures ranging from -10 to 100 degrees C. | |||
==Detailed description== | |||
''No detailed description exists yet for this component'' | |||
==Examples== | ==Examples== | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| Line 25: | Line 27: | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
=== | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
Measures the surrounding ambient temperature, | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MeasureSurTemp''' | |||
|- | |||
| colspan="2" | Measures the surrounding ambient temperature, | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
:'' | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MeasureObjectTemp''' | |||
|- | |||
| colspan="2" | Measures the temperature of the targetted object | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
''' | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue''' | |||
|- | |||
| colspan="2" | Gets the raw ADC input value for the IR receiver | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Initialise the component by loading the default calibration table | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
''' | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Initialise the sensor configuration as set by the component properties | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Initialises the component ready for I2C communications | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
:[[ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Sets up up the communication bus and initialises the accelerometer module. Returns 0 for success and > 0 for fail. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SimSetGyro''' | |||
|- | |||
| colspan="2" | Allows the XYZ slider values to be set via the simulation | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | X | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | Y | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | Z | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
'' | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UpdateAccelerometerData''' | |||
|- | |||
| colspan="2" | Reads from the accelerometer and updates the local XYZ variables. Returns 1 for new data and 0 for no new data | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
== | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SimSetCompass''' | |||
|- | |||
| colspan="2" | Allows the XYZ slider values to be set via the simulation | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | X | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | Y | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | Z | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Read_Bearing''' | |||
|- | |||
| colspan="2" | Reads the current sensor compass bearing based on degrees CW from magnetic north. Returns 0-359 where 0 = North, 90 = East, 180 = South, 270 = West Requires the ArcTan floating point function to be available to work correctly. Supported on AVR, 16-bit | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | NumSamples | |||
|- | |||
| colspan="2" | The number of readings to base the bearing on | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Sets up up the communication bus and initialises the accelerometer module. Returns 0 for success and > 0 for fail. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin''' | |||
|- | |||
| colspan="2" | Sets the selected digital pin to an output and assigns the output state. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Pin | |||
|- | |||
| colspan="2" | Range: 0-29 | |||
|- | |||
| width="10%" align="center" | [[File:]] - | |||
| width="90%" | State | |||
|- | |||
| colspan="2" | Range: 0-1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive''' | |||
|- | |||
| colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10''' | |||
|- | |||
| colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | ADCChannel | |||
|- | |||
| colspan="2" | Range: 0, 3-7 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SampleCount | |||
|- | |||
| colspan="2" | Range: 1- 100 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SampleDelay | |||
|- | |||
| colspan="2" | Delay in us between each sample | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus''' | |||
|- | |||
| colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise''' | |||
|- | |||
| colspan="2" | Initialsie the SPI module ready for communications | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireReceiveByte''' | |||
|- | |||
| colspan="2" | Receives a byte from the one wire bus a bit at a time | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend''' | |||
|- | |||
| colspan="2" | Transmit a byte using the I2C bus | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | DataOut | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend''' | |||
|- | |||
| colspan="2" | Send a byte via the UART module | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Data | |||
|- | |||
| colspan="2" | Data Byte to send. Range: 0-255 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetDeviceCount''' | |||
|- | |||
| colspan="2" | Returns the number of devices found by the last ScanBus operation. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetPrescaler''' | |||
|- | |||
| colspan="2" | Sets the prescaler for the PWM output | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Range: 0 - 11 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Prescaler | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Period | |||
|- | |||
| colspan="2" | | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable''' | |||
|- | |||
| colspan="2" | Enable a PWM output | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | Channel | |||
|- | |||
| colspan="2" | Range: 0-11 | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10''' | |||
|- | |||
| colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | ADCChannel | |||
|- | |||
| colspan="2" | Range: 0, 3-7 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SampleCount | |||
|- | |||
| colspan="2" | Range: 1- 32 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" | SampleDelay | |||
|- | |||
| colspan="2" | Delay in us between each sample | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" | Samples | |||
|- | |||
| colspan="2" | 10-bit samples returned from the function | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
10 | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage8''' | |||
|- | |||
| colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | ADCChannel | |||
|- | |||
| colspan="2" | Range: 0, 3-7 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SampleCount | |||
|- | |||
| colspan="2" | Range: 1- 100 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" | SampleDelay | |||
|- | |||
| colspan="2" | Delay in us between each sample | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | |||
|- | |||
| colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. | |||
|- | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
==Property reference== | |||
Default 10. | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | |||
| width="90%" | Ambient Pin (SUR) | |||
|- | |||
| colspan="2" | Analogue input channel - which pin is the analogue input conected to? | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | |||
| width="90%" | Object Pin (OBJ) | |||
|- | |||
| colspan="2" | Analogue input channel - which pin is the analogue input conected to? | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |||
| width="90%" | VRef voltage | |||
|- | |||
| colspan="2" | 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 | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |||
| width="90%" | VRef option | |||
|- | |||
| colspan="2" | 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. | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |||
| width="90%" | Conversion speed | |||
|- | |||
| colspan="2" | 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. | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |||
| width="90%" | Acquisition cycles | |||
|- | |||
| colspan="2" | Number of micro seconds to wait for the ACD input to charge before starting the analogue sample. | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |||
| width="90%" | Temperature Calibration | |||
|- | |||
| colspan="2" | Ambient temperature calibration value | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |||
| width="90%" | Temperature Range | |||
|- | |||
| colspan="2" | Map of temperature-voltage according to sensor datasheet. 10 is the temperature step when sensor and object distance is 9CM. | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |||
| width="90%" | Offset Voltage | |||
|- | |||
| colspan="2" | Voltage of mid level voltage after 5-10 mins to bring the sensor to ambient. | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]] | |||
| width="90%" | Number of Samples | |||
|- | |||
| colspan="2" | Number of samples to take to average out each reading. Default 10. | |||
|- | |||
| 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 20:45, 16 November 2021
| Author | Matrix TSL |
| Version | 1.2 |
| Category | Environmental |
Temperature Infrared component
The Grove Infrared Temperature Sensor allows none contact measurement of temperatures ranging from -10 to 100 degrees C.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
| MeasureSurTemp | |
| Measures the surrounding ambient temperature, | |
| [[File:]] - | Return |
| MeasureObjectTemp | |
| Measures the temperature of the targetted object | |
| [[File:]] - | Return |
| GetADCValue | |
| Gets the raw ADC input value for the IR receiver | |
| Return | |
| Initialise | |
| Initialise the component by loading the default calibration table | |
| Return | |
| Initialise | |
| Initialise the sensor configuration as set by the component properties | |
| Return | |
| Initialise | |
| Initialises the component ready for I2C communications | |
| Return | |
| Initialise | |
| Sets up up the communication bus and initialises the accelerometer module. Returns 0 for success and > 0 for fail. | |
| Return | |
| SimSetGyro | |
| Allows the XYZ slider values to be set via the simulation | |
| [[File:]] - | X |
| [[File:]] - | Y |
| [[File:]] - | Z |
| Return | |
| UpdateAccelerometerData | |
| Reads from the accelerometer and updates the local XYZ variables. Returns 1 for new data and 0 for no new data | |
| Return | |
| SimSetCompass | |
| Allows the XYZ slider values to be set via the simulation | |
| [[File:]] - | X |
| [[File:]] - | Y |
| [[File:]] - | Z |
| Return | |
| Initialise | |
| Sets up up the communication bus and initialises the accelerometer module. Returns 0 for success and > 0 for fail. | |
| Return | |
| IOSetOutputPin | |
| Sets the selected digital pin to an output and assigns the output state. | |
| Pin | |
| Range: 0-29 | |
| [[File:]] - | State |
| Range: 0-1 | |
| Return | |
| UARTReceive | |
| Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. | |
| Channel | |
| Channel Index: Range 0 - UART Bus Count - 1 | |
| Return | |
| OneWireScanBus | |
| Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| SPIInitialise | |
| Initialsie the SPI module ready for communications | |
| Channel | |
| Channel Index: Range 0 - SPI Bus Count - 1 | |
| Return | |
| OneWireReceiveByte | |
| Receives a byte from the one wire bus a bit at a time | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| I2CSend | |
| Transmit a byte using the I2C bus | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| DataOut | |
| [[File:]] - | Return |
| UARTSend | |
| Send a byte via the UART module | |
| Channel | |
| Channel Index: Range 0 - UART Bus Count - 1 | |
| Data | |
| Data Byte to send. Range: 0-255 | |
| Return | |
| OneWireGetDeviceCount | |
| Returns the number of devices found by the last ScanBus operation. | |
| Channel | |
| Channel Index: Range 0 - I2C Bus Count - 1 | |
| Return | |
| PWMSetPrescaler | |
| Sets the prescaler for the PWM output | |
| Channel | |
| Range: 0 - 11 | |
| Prescaler | |
| Period | |
| Return | |
| PWMEnable | |
| Enable a PWM output | |
| Channel | |
| Range: 0-11 | |
| Return | |
| Initialise | |
| Initialise the comms to the Arduino board ready for commands to be sent. | |
| Return | |