The block returns the IR sensor analog reading. The reading varies from 0 to 4095.
Let us understand the IR Sensors. An infrared (IR) sensor is an electronic device that measures and detects infrared radiation in its surrounding environment. IR is invisible to the human eye.
Quarky has 2 IR sensors.
Let’s understand how they work.
An IR sensor consists of 2 LEDs: one which transmits the IR light and one which receives the IR light. When the IR rays are transmitted, they bounce from the nearest surface and get back to the receiver LED. That’s how an IR sensor detects an object.
We can get the sensor values in PictoBlox based on that value. We can estimate whether there is an obstacle.
- If the sensor detects nothing, its output value is increased. This means that the sensor is active.
- If it detects an obstacle, its output value decreases. This means that the sensor is inactive.
IR sensors DON’T work in sunlight. IR rays from the sun increase the overall threshold of the sensors; therefore they stay active all time. A closed environment or nighttime is the place/time to work with your line following robot.