Level B: Working with Line Sensors

Update: Level B is now available! Click here to learn more.

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.

Older Post
Newer Post

1 comment

  • Working on level A, kids love it we all sit down as a family and enjoy working on it together. Can’t wait to move on to level B.

    Mark Goss

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