Component: Photo Reflector (Sensors)
Author | Matrix Ltd |
Version | 1.0 (Release) |
Category | Sensors |
Contents
Photo Reflector component
Uses InfraRed light to detect if an external object is near to the sensor. Returns a discrete analogue signal which can represent distance from the nearest object. Useful for applications like wall following, control based systems and robotics.
Examples
No additional examples
Downloadable macro reference
SampleSensor
Samples the sensor and automatically controls the emitter pin if enabled.
Returns the analogue reading from the sensor pin.
Parameters
- This macro has no parameters
Return value
Initialise
Sets up the I/O to allow the sensor to operate.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Emitter Type
This property is of type Fixed list of ints and can be referenced with the variable name EmitterType.
Decides if the emitter needs to be switched on and off during sampling
Sense Pin
This property is of type Single analog pin and can be referenced with the variable name SensePin.
Pin connected to the sensor element of the photo transistor
Discrete Distance
This property is of type Floating point and can be referenced with the variable name DiscreteDistance.
Simulation range used to determine if the sense pin is active or not.