Video: Working With The 3pi Robot’s Line Sensors

This week, we are serving up part five in our series where we are using the Pololu 3pi robot as a fancy development board for the ATmega328p processor. This week we are taking a quick break from working with the perpherals specific to the processor and will show how to work with the 3pi’s line sensors. A quick look at the schematic for the 3pi might lead you to think that you should be reading the line sensors with the A2D peripheral. Even though they are wired to the A2D pins, they need to be read digitally. In the video, [Jack] will show how to read raw values from the sensors and then how to calibrate the results so that you can get a nice clean 8-bit value representing what the sensors are seeing. Of course, that would happen under normal circumstances. Murphy had his way in this video and it turned out that our studio lighting was interfering a bit with the sensor readings when we were shooting so we didn’t get as good of a calibration as we would have liked when we shot.

Video is after the break.

In case you have missed the previous videos here are some links:

Part 1: Setting up the development environment
Part 2: Basic I/O
Part 3: Pulse Width Modulation
Part 4: Analog to Digital conversion

4 thoughts on “Video: Working With The 3pi Robot’s Line Sensors

  1. Thanks for the vid. Those 3pi robots are a great piece of work, i love using them.

    My only complaint is that lack of onboard FTDI/USB means newbs have to buy a dedicated programmer and hack the arduino ide, which is a pain.

  2. Is there a reason you chose not to use the bool type for ScaleOutput since it seems like its only going to ever be a 0 or 1. I know its on topic but Im just learning C and was wondering what the reasoning was.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.