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 order Level A and we will be sure to notify you when Level B is available.