O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Obstacle avoidance sensor

The emitter on the infrared obstacle avoidance sensor emits infrared radiation and if an obstacle is in front of the sensor, some of the radiation is reflected back and picked up by the receiver. If no object is in front of the sensor then the radiation will dissipate, and the receiver will not receive anything back.

The pins on the sensor are clearly marked with OUT, GND, and VCC, from left to right. The GND pin is connected to the ground rail and the VCC pin is connected to the power rail of the breadboard. The OUT pin is connected directly to a digital pin on the Arduino. If the signal from the OUT pin is LOW, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required