Component: Photo Transistor 2D (Light): Difference between revisions
Appearance
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| Line 132: | Line 132: | ||
| colspan="2" | Decides if the emitter needs to be switched on and off during sampling | | colspan="2" | Decides if the emitter needs to be switched on and off during sampling | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Connections | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.0 |
| Category | Light |
Photo Transistor 2D component
Uses InfraRed light to detect if an external object is near to the sensor. Returns a digital signal which can represent detected or not detected states. Useful for applications like line following, punched card based data systems and robotics.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_PhotoTransistor_2d.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_PhotoTransistor_2d.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Basic example which moves a object on the simulation panel and provides the analogue proximity reading based on the distance from the object from the sensor.
PhotoReflectorDemo
Macro reference
Initialise
| Initialise | |
| Configures the I/O ready for the sensor to be sampled. | |
| Return | |
SampleSensor
| SampleSensor | |
| Samples the sensor and automatically controls the emitter pin if enabled. Returns the state of the sensor pin. | |
| Return | |
Property reference
| Properties | |
| Emitter Type | |
| Decides if the emitter needs to be switched on and off during sampling | |
| Connections | |
| Sense Pin | |
| Pin connected to the sensor element of the photo transistor | |