How-to Tuesday: Getting started with the 3pi

Robotics Technology
How-to Tuesday: Getting started with the 3pi

This week I am going to show you how to get up and running with the 3pi by Pololu. I will be going through all the steps needed to upload the line following program that is included from Pololu. Getting started with the 3pi isn’t too difficult, but there are a few applications and drivers that need to be installed.

Note: In this tutorial I will be using a PC running Vista. You can program the 3pi on a Mac running OSX or Linux, but it’s a different procedure. You can even program the 3pi through the Arduino IDE!


What you need:

Optional Items:

Part 1: Setting up the 3pi


Unpack and add the 4 AAA batteries. You need to remove the LCD to insert (2) of the (4) batteries. Just carefully lift it up and it will come off easily.


Replace the LCD and press the power button. The 3pi comes with a demo program already installed. It goes over several different features of the 3pi.

Part 2: Downloading & installing custom programs


Start by downloading the Orangutan USB Programmer drivers. Follow the installation instructions. The installer takes care of everything.


Download and instal WinAVR. This is a set of free open-source tools for programming Atmel AVR series (or RISC) microprocessors. Follow the installation instructions.


Next, download Atmel’s free ARV Studio. This is the integrated development environment (IDE) that we will use to program the 3pi. Follow the installation instructions.

Finally download and install the Pololu C/C++ AVR Library. Extract all the files somewhere convenient.

Part 3: Installing the libraries


Inside new folder called “libpololu-avr” is a file called “libpololu.a”. Copy that file over to the “lib” subdirectory of the “avr” directory found inside the WinAVR folder. (C:WinAVR-20080610avrlib)

Note: Make sure you copy the “libpololu.a” file in thecorrect “lib” directory. It should go in C:WinAVR-20081205avrlib NOT C:WinAVR-20081205lib.


Next, copy the entire “pololu” folder into the “include” subdirectory of your “avr” directory. (C:WinAVR-20080610avrincludepololu)

Now you are all ready to start programming your 3pi.

Part 4: Uploading code


In the Pololu folder there is a subfolder called “examples”. Open that folder and you will find a line follower example program. Click on the “test” file in the “3pi-linefollower” folder and WinAVR should start loading.


To compile the program, click “Build” (F7) and check to see that the code is OK. If there are errors you will find them on the bottom of the screen. They will be highlighted with a red dot.

If everything compiles OK, it’s time to upload the file to the 3pi.


Connect your Orangutan programmer to the 3pi and press the power button.


Select “Program AVR” and click on “Connect”. Select “STK500 or AVRISP” and “Auto” AVR Studio should open a new window called “AVRISP in ISP mode with ATmega168”. In that window click on the “…” button in the “Flash” section. Select the “test.hex” file that can be found inside the demo line follow folder. Now you can click “Program in the “Flash” section and the code should upload to the 3pi.

Part 4: Making a course

Making a course is easy. Just use some electrical tape on a large piece of paper. Set the 3pi down on the line and press the power button. Now press the “B” button twice and watch the 3pi go!

Suscribe to the MAKE podcast
| Download for iTunes



Pololu 3pi Robot

Discuss this article with the rest of the community on our Discord server!


Ready to dive into the realm of hands-on innovation? This collection serves as your passport to an exhilarating journey of cutting-edge tinkering and technological marvels, encompassing 15 indispensable books tailored for budding creators.