In this article you will find out what an IR sensor A is and how to use it

DESCRIPTION
The sensor contains 2 elements: an infrared LED that emits light in the infrared range, and a sensitive photocell. If there is a reflective surface near the sensor, part of the light returns to the photocell. The closer the surface and the “whiter” it is, the more light returns to the receiver, the higher the sensor readings. The sensor transmits a value between 0 and 1023.
Technical description:

– Size (L*W*H): 40x24x24
– (PIN A) The sensor detects the reflection of the light signal and sets the analog value on PIN A corresponding to the intensity of the reflected light
– Operating voltage: 5V
– F-Dupont 3pin connector for connecting to another device

Functionality when connected to the RED X controller:

The infrared sensor registers the amount of reflected infrared light.


IR sensor (A) connecting scheme

RED Code Example
*Physically, if the IR sensor D sensor connected to port D2 reads white colour, then the servomotor connected to port D1 rotates by zero degree, otherwise the servomotor rotates by 180 degrees

Technical support

red.help@r-ed.world

© R:ED – Robotics Education. All rights reserved