6.a. Downloading and Installing the C/C++ Library

The Pololu C/C++ AVR Library makes it easy for you to use the advanced features of your 3pi; the library is used for all of the examples in the following sections. For your convenience, the source code for these examples and the demo program is included with the library. To begin the installation process for the Pololu AVR C/C++ Library, you will need to download one of the following zip files:

We recommend the precompiled version, which will be easier to install for most people. If you have trouble installing the precompiled version, or you are interested in taking a closer look at the source code, please download the source distribution and see Section 4 of the Pololu AVR C/C++ Library User’s Guide for compilation instructions.

Open the .zip file and click “Extract all” to extract the Pololu AVR Library files. A directory called “libpololu-avr” will be created.

Determine the location of your avr-gcc files. In Windows, they will usually be in a folder such as: C:\WinAVR-20080610\avr. In Linux, the avr-gcc files are probably located in /usr/avr. If you currently have an older version of the Pololu AVR Library, your first step should be to delete all of the old include files and the libpololu.a file that you installed previously.

Next, copy libpololu.a into the lib subdirectory of your avr directory (e.g. C:\WinAVR-20080610\avr\lib.)

Finally, copy the entire pololu subfolder into the include subfolder. (e.g. The Pololu include files should now be located in C:\WinAVR-20080610\avr\include\pololu.)

The Pololu AVR Library header files, installed correctly.

You are now ready to use the Pololu AVR library with your 3pi.

Note: To learn more about the functions in the Pololu AVR Library and how to use them, please see the Pololu AVR Library Command Reference.