6. Programming Your 3pi

6.a. Downloading and Installing the C/C++ Library
6.b. Compiling a Simple Program

To do more with your 3pi than explore the demo program, you will need to program it, which requires an external AVR ISP programmer such as our Orangutan USB programmer. Your first step should be to set up your programmer by following its installation instructions. If you are using the Orangutan USB programmer, please see its user’s guide.

Next you will need software that can compile your programs and transfer them to your 3pi via your programmer. We recommend you download two software packages for this:

  1. WinAVR, a free, open-source suite of development tools for the AVR family of microcontrollers, including the GNU GCC compiler for C/C++.
  2. AVR Studio, Atmel’s free integrated development environment (IDE) that natively works with WinAVR’s free GCC C/C++ compiler. AVR Studio includes AVR ISP software that will let you upload your programs to the 3pi.

Note: You can also program your 3pi using the Arduino IDE and an external ICSP programmer, such as our Orangutan USB programmer. For instructions on this approach, please see our guide: Programming Orangutans and the 3pi Robot from the Arduino Environment. The rest of this guide will be based on AVR Studio.

For more general instructions on using the Pololu C/C++ libraries with our AVR-based robot boards, including Linux installation instructions, see the Pololu AVR C/C++ Library User’s Guide.