AVR Library Command Reference

1. Introduction
This document describes a programming library designed for use with Pololu products. The library is used to create
programs that run on Atmel ATmega168 and ATmega48 processors, and it supports the following products:
Pololu 3pi robot: a mega168-based robot controller. The 3pi robot essentially contains an LV-168 and a
5-sensor version of the QTR-8RC, both of which are in the list below.
Pololu Orangutan SV-168: a full-featured, mega168-based robot controller that includes an LCD display.
The SV-168 runs on an input voltage of 6-13.5V, giving you a wide range of robot power supply options,
and can supply up to 3 A on its regulated 5 V bus.
Pololu Orangutan LV-168: a full-featured, mega168-based robot controller that includes an LCD display.
The LV-168 runs on an input voltage of 2-5V, allowing two or three batteries to power a robot.
Pololu Baby Orangutan B-48: a compact, complete robot controller based on the mega48. The B-48
packs a voltage regulator, processor, and a two-channel motor-driver into a 24-pin DIP format.
Pololu Baby Orangutan B-168: a mega168 version of the above. The mega168 is a more powerful
processor, with more memory for your programs. This version has been replaced by the Baby Orangutan
B-328.
Pololu Baby Orangutan B-328: a mega328 replacement of the above Baby Orangutan B-168. The
mega328 offers even more memory for your programs (32 KB flash, 2 KB RAM).
Pololu QTR-1A and QTR-8A reflectance sensors (analog): an analog sensor containing IR/
phototransistor pairs that allows a robot to detect the difference between shades of color. The QTR sensors
can be used for following lines on the floor, for obstacle or drop-off (stairway) detection, and for various
other applications.
Pololu QTR-1RC and QTR-8RC reflectance sensors (RC): a version of the above that is read using
digital inputs; this is compatible with the Parallax QTI sensors.
Encoder for Pololu Wheel 42×19 mm: a wheel encoder solution that allows a robot to measure how far it
has traveled.
The library is written in C++ and may be used in three different programming environments:
Arduino [http://www.arduino.cc]: a popular, beginner-friendly programming environment for the mega168,
using simplified C++ code. We have written a guide to using Arduino with Orangutan
controllers [http://www.pololu.com/docs/0J17] to help you get started.
C++: supported by the AVR-GCC/WinAVR project. See the Pololu AVR C/C++ Library User’s
Guide [http://www.pololu.com/docs/0J20] to get started.
C / AVR Studio: bindings to the C language are included in the library so that you can write programs
entirely in C, which is the standard for Atmel’s AVR Studio [http://www.atmel.com/avrstudio/]. See the Pololu
AVR C/C++ Library User’s Guide [http://www.pololu.com/docs/0J20] to get started.
Pololu AVR Library Command Reference © 2001–2009 Pololu Corporation
1. Introduction Page 2 of 35