Difference between revisions of "Component: Infrared Array AMG88xx (Light)"

From Flowcode Help
Jump to navigationJump to search
 
(8 intermediate revisions by the same user not shown)
Line 16: Line 16:
  
 
==Component Source Code==
 
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_AMG88.fcfx FC_Comp_Source_AMG88.fcfx]
  
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_AMG88.fcfx FC_Comp_Source_AMG88.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_AMG88.fcfx FC_Comp_Source_AMG88.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 30: Line 40:
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 39: Line 57:
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
  
==Macro reference==
 
  
{| 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;" | '''SetMovingAverageMode'''
 
|-
 
| colspan="2" | Set the moving average mode on or off.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Mode
 
|-
 
| colspan="2" | 0 = Off, 1 = On&nbsp;
 
|-
 
| 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;" | '''ClearInterrupt'''
 
|-
 
| colspan="2" | Clear any triggered interrupts&nbsp;
 
|-
 
|-
 
| 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;" | '''SetInterruptMode'''
 
|-
 
| colspan="2" | Set the interrupt to either absolute value or difference mode&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Mode
 
|-
 
| colspan="2" | 0 = Difference / 1 = Absolute&nbsp;
 
|-
 
| 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;" | '''SetInterrupt'''
 
|-
 
| colspan="2" | Allows the interrupt pin to be enabled or disabled.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Mode
 
|-
 
| colspan="2" | 0 = Disabled / 1 = Enabled&nbsp;
 
|-
 
| 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;" | '''SetInterruptLevels'''
 
|-
 
| colspan="2" | Set the interrupt levels. Interrupt when going above High or interrupt when going below Low.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | High
 
|-
 
| colspan="2" | Range: -1023 to 1023&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Low
 
|-
 
| colspan="2" | Range: -1023 to 1023&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
| width="90%" | Hysteresis
 
|-
 
| colspan="2" | Range: -1023 to 1023  ( Recommend 0.95 * High )&nbsp;
 
|-
 
| 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''
 
|}
 
  
  
 +
 +
==Macro reference==
 +
 +
===ClearInterrupt===
 
{| 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;" | '''SamplePixels'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearInterrupt'''
 
|-
 
|-
| colspan="2" | Reads Infrared sensor values&nbsp;
+
| colspan="2" | Clear any triggered interrupts&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 149: Line 85:
  
  
 +
===Initialise===
 
{| 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;" | '''ReadThermistor'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Reads the onboard thermistor Returns the temperature in degrees Celsius as a floating point value&nbsp;
+
| colspan="2" | Sets up the I2C interface and initialises the sensor.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===ReadPixel===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 180: Line 118:
  
  
 +
===ReadThermistor===
 
{| 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;" | '''Initialise'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadThermistor'''
 
|-
 
|-
| colspan="2" | Sets up the I2C interface and initialises the sensor.&nbsp;
+
| colspan="2" | Reads the onboard thermistor Returns the temperature in degrees Celsius as a floating point value&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| 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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Channel selection&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | SDA
 
|-
 
| colspan="2" | Pin used for SDA (data signal)&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | SCL
 
|-
 
| colspan="2" | Pin used for SCL (clock signal)&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Baud Select
 
|-
 
| colspan="2" | Baud rate option selector&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Baud Rate
 
|-
 
| colspan="2" | Baud rate to be used&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Stop Delay
 
|-
 
| colspan="2" | 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. &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Scope Traces
 
|-
 
| colspan="2" | Selects if the scope traces are automatically generated or not&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
 
| colspan="2" | Selects if the console data is automatically generated or not&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | API
 
|-
 
| colspan="2" | &nbsp;
 
|}==Macro reference==
 
 
 
{| 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;" | '''SetMovingAverageMode'''
 
|-
 
| colspan="2" | Set the moving average mode on or off.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Mode
 
|-
 
| colspan="2" | 0 = Off, 1 = On&nbsp;
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
 +
===SamplePixels===
 
{| 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;" | '''ClearInterrupt'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SamplePixels'''
 
|-
 
|-
| colspan="2" | Clear any triggered interrupts&nbsp;
+
| colspan="2" | Reads Infrared sensor values&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 293: Line 146:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===SetInterrupt===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInterruptMode'''
 
|-
 
| colspan="2" | Set the interrupt to either absolute value or difference mode&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 
| width="90%" | Mode
 
|-
 
| colspan="2" | 0 = Difference / 1 = Absolute&nbsp;
 
|-
 
| 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;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 329: Line 165:
  
  
 +
===SetInterruptLevels===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 357: Line 194:
  
  
 +
===SetInterruptMode===
 
{| 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;" | '''SamplePixels'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetInterruptMode'''
 
|-
 
|-
| colspan="2" | Reads Infrared sensor values&nbsp;
+
| colspan="2" | Set the interrupt to either absolute value or difference mode&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Mode
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | 0 = Difference / 1 = Absolute&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadThermistor'''
 
 
|-
 
|-
| colspan="2" | Reads the onboard thermistor Returns the temperature in degrees Celsius as a floating point value&nbsp;
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
|-
 
|-
 
| 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''
 
|}
 
|}
  
  
 +
===SetMovingAverageMode===
 
{| 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;" | '''ReadPixel'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMovingAverageMode'''
 
|-
 
|-
| colspan="2" | Reads the temperature of a single pixel value from the last SamplePixels call.&nbsp;
+
| colspan="2" | Set the moving average mode on or off.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Index
+
| width="90%" | Mode
|-
 
| colspan="2" | Pixel to read. Range: 0 - 63&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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 the I2C interface and initialises the sensor.&nbsp;
 
 
|-
 
|-
 +
| colspan="2" | 0 = Off, 1 = On&nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 10:25, 20 October 2023

Author Matrix TSL
Version 1.0
Category Light


Infrared Array AMG88xx component

An 8x8 (64) Pixel infrared sensor array allowing basic none contact temperature detection.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

ClearInterrupt

Fc9-comp-macro.png ClearInterrupt
Clear any triggered interrupts 
Fc9-void-icon.png - VOID Return


Initialise

Fc9-comp-macro.png Initialise
Sets up the I2C interface and initialises the sensor. 
Fc9-void-icon.png - VOID Return


ReadPixel

Fc9-comp-macro.png ReadPixel
Reads the temperature of a single pixel value from the last SamplePixels call. 
Fc9-u8-icon.png - BYTE Index
Pixel to read. Range: 0 - 63 
Fc9-f32-icon.png - FLOAT Return


ReadThermistor

Fc9-comp-macro.png ReadThermistor
Reads the onboard thermistor Returns the temperature in degrees Celsius as a floating point value 
Fc9-f32-icon.png - FLOAT Return


SamplePixels

Fc9-comp-macro.png SamplePixels
Reads Infrared sensor values 
Fc9-void-icon.png - VOID Return


SetInterrupt

Fc9-comp-macro.png SetInterrupt
Allows the interrupt pin to be enabled or disabled. 
Fc9-bool-icon.png - BOOL Mode
0 = Disabled / 1 = Enabled 
Fc9-void-icon.png - VOID Return


SetInterruptLevels

Fc9-comp-macro.png SetInterruptLevels
Set the interrupt levels. Interrupt when going above High or interrupt when going below Low. 
Fc9-f32-icon.png - FLOAT High
Range: -1023 to 1023 
Fc9-f32-icon.png - FLOAT Low
Range: -1023 to 1023 
Fc9-f32-icon.png - FLOAT Hysteresis
Range: -1023 to 1023 ( Recommend 0.95 * High ) 
Fc9-void-icon.png - VOID Return


SetInterruptMode

Fc9-comp-macro.png SetInterruptMode
Set the interrupt to either absolute value or difference mode 
Fc9-bool-icon.png - BOOL Mode
0 = Difference / 1 = Absolute 
Fc9-void-icon.png - VOID Return


SetMovingAverageMode

Fc9-comp-macro.png SetMovingAverageMode
Set the moving average mode on or off. 
Fc9-bool-icon.png - BOOL Mode
0 = Off, 1 = On 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-type-21-icon.png Address
 
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 Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png API