Component: Infrared (EBM020) (EBM Modules): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 62: | Line 62: | ||
===GetADCValue=== | ===GetADCValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetADCValue''' | ||
|- | |- | ||
| colspan="2" | Gets the raw ADC input value for the IR receiver | | colspan="2" | Gets the raw ADC input value for the IR receiver | ||
| Line 76: | Line 76: | ||
===GetDistanceValue=== | ===GetDistanceValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetDistanceValue''' | ||
|- | |- | ||
| colspan="2" | Returns the calculated distance for the given ADC reading | | colspan="2" | Returns the calculated distance for the given ADC reading | ||
| Line 95: | Line 95: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Initialise the component by loading the default calibration table | | colspan="2" | Initialise the component by loading the default calibration table | ||
| Line 109: | Line 109: | ||
===SetTxOff=== | ===SetTxOff=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetTxOff''' | ||
|- | |- | ||
| colspan="2" | Turns off the IR Transmitter | | colspan="2" | Turns off the IR Transmitter | ||
| Line 123: | Line 123: | ||
===SetTxOn=== | ===SetTxOn=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetTxOn''' | ||
|- | |- | ||
| colspan="2" | Turns on the IR Transmitter | | colspan="2" | Turns on the IR Transmitter | ||
| Line 138: | Line 138: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 154: | Line 154: | ||
| colspan="2" | Pin used to control the IR Transmitter | | colspan="2" | Pin used to control the IR Transmitter | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Initial/ Hardware Calibration Table | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | EBM Modules |
Infrared component
The Infrared sensor board contains both an IR transmitter and receiver. The transmitter is enabled via a digital control signal and the receiver provides an analogue output. By enabling the transmitter and reading the variable voltage output of the receiver it is possible to measure the distance of a reflecting object in the region of 1cm to 10cm.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_EBM020v1.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_EBM020v1.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetADCValue
| GetADCValue | |
| Gets the raw ADC input value for the IR receiver | |
| Return | |
GetDistanceValue
| GetDistanceValue | |
| Returns the calculated distance for the given ADC reading | |
| adc | |
| Return | |
Initialise
| Initialise | |
| Initialise the component by loading the default calibration table | |
| Return | |
SetTxOff
| SetTxOff | |
| Turns off the IR Transmitter | |
| Return | |
SetTxOn
| SetTxOn | |
| Turns on the IR Transmitter | |
| Return | |