Level B: Infrared Obstacle Sensors

In Level B you will learn to work with an infrared obstacle sensor as well as a level shifter. In this video, an infrared obstacle sensor is emitting infrared waves and watching for them to be reflected off an object. Reflection only happens if an object is fairly close in front of the sensor.

The output line from the sensor is running through a 5V to 3.3V level shifter to make the output safe to connect to a Raspberry Pi. That 3.3V output line is connected to a GPIO pin on the Raspberry Pi. The Python program is written to watch that GPIO input to determine if an object has been detected. If no object is near then the RBG LED will stay green, and if an object is detected the LED will switch to red.

Knowing how to work with infrared obstacle sensors and level shifters will come in handy later in Level D as these sensors can help a robot avoid objects without making physical contact with them, which could damage the robot or sensors.

Ready to get started? Click here to learn more.

Older Post
Newer Post

Leave a comment

Please note, comments must be approved before they are published

Close (esc)


Use this popup to embed a mailing list sign up form. Alternatively use it as a simple call to action with a link to a product or a page.

Age verification

By clicking enter you are verifying that you are old enough to consume alcohol.


Your cart is currently empty.
Shop now