5.g. Pololu3pi - Sensor Library for the 3pi Robot

Overview

This library allows you to easily interface with the five infrared reflectance sensors on the 3pi robot. Note that in order to use this library, you must also include PololuQTRSensors.h in your sketch. You should have something like the following at the top of your sketch:

#include <Pololu3pi.h>  // gives access to sensor interface functions
#include <PololuQTRSensors.h>  // used by Pololu3pi.h
#include <OrangutanMotors.h>  // gives access to motor control functions
#include <OrangutanBuzzer.h>  // gives access to buzzer control functions

Unlike the other Orangutan libraries, you must explicitly call the init() method to initialize your Pololu3pi object before using it.

All of the methods in this class are static; you should never have more than one instance of a Pololu3pi object in your sketch.

Pololu3pi Methods

Complete documentation of this library’s methods can be found in Section 19 of the Pololu AVR Library Command Reference.

Usage Examples

This library comes with three example sketches that you can load by going to File > Examples > Pololu3pi. There is a simple line-following example, a more advanced PID-based line-following example, and a basic maze-solving example.

    

For more information on creating line and maze courses, as well as a detailed explanation of the C versions of the demo programs, please see sections 6 and 7 of the 3pi User’s Guide.


Related Products

Baby Orangutan B-328 + USB Programmer Combo
Baby Orangutan B-48 + USB Programmer Combo
Baby Orangutan B-168 + USB Programmer Combo
3pi Robot + USB Programmer + Cable Combo
Orangutan LV-168 + USB Programmer Combo
Orangutan SV-168 Robot Controller
Orangutan SV-168 + USB Programmer Combo
Orangutan SV-328 + USB Programmer Combo
Baby Orangutan B-328 + USB AVR Programmer Combo
Baby Orangutan B-48 + USB Programmer Combo
Orangutan LV-168 + USB Programmer Combo
Orangutan SV-328 + USB Programmer Combo
3pi Robot + USB Programmer Combo
Orangutan SV-328 Robot Controller
Orangutan LV-168 Robot Controller
Baby Orangutan B-48 Robot Controller
Baby Orangutan B-328 Robot Controller
Pololu 3pi Robot
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors