Time for another preview of one of the electrical components you will learn about in Level B (available soon!): Line sensors.
In this video, two infrared line sensors are sensing the color change between black and white. Their output lines are running through a 5V to 3.3V level shifter to make the output safe to connect to a Raspberry Pi. Those 3.3V output lines are connected to two GPIO pins on the Raspberry Pi. The Python program has been written to watch for input from either sensor.
If no sensor is detecting black then the RGB LED stays off, if the left sensor detects black then the LED turns red, and if the right sensor detects black then the LED turns green.
Amazing right? And here’s the best part—you will learn to do all that, including working with line sensors and level shifters, in Level B!
Once you get to Level D, these line sensors are very useful with a functioning robot. By attaching these sensors to a robot, you would use similar commands to direct the robot to follow the line:
No light = The line is between the sensors, drive both motors equally to continue in straight line
Red light = Left sensor has detected the line, slow or stop left motor until line is centered again
Green light = Right sensor has detected the line, slow or stop right motor until line is centered again
Ready to get started? Click here to order Level A and we will be sure to notify you when Level B is available.