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!

IMG_7154.JPG
What you need:

Optional Items:

Part 1: Setting up the 3pi
IMG_7133.JPG
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.

IMG_7136.JPG
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
ScreenShot003.jpg
Start by downloading the Orangutan USB Programmer drivers. Follow the installation instructions. The installer takes care of everything.

ScreenShot010.jpg
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.

ScreenShot013.jpg
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
pololu-a.jpg
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-20080610\avr\lib)

Note: Make sure you copy the "libpololu.a" file in thecorrect "lib" directory. It should go in C:\WinAVR-20081205\avr\lib NOT C:\WinAVR-20081205\lib.

wholefolder.jpg
Next, copy the entire "pololu" folder into the "include" subdirectory of your "avr" directory. (C:\WinAVR-20080610\avr\include\pololu)

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

Part 4: Uploading code
example.jpg
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.
build.jpg
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.

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

ScreenShot020.jpg
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

Makershedsmall
MKPO1-12.jpg
Pololu 3pi Robot


Recent Entries

Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television




Check out more videos from MAKE.

Maker SHED

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter



    MAKE Archives

    Make: Money

    Make: Science Room
    Subscribe to MAKE Magazine!

    Make: Online editors and authors!

    Gareth BranwynGareth Branwyn
    Editor-in-Chief


    Phillip TorronePhillip Torrone
    Senior Editor
    | Web | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter


    John BaichtalJohn Baichtal
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Current Podcast

    itunesdl.gif Behind the Scenes at MAKE and CRAFT In January, many of the remote MAKE/CRAFT team members (myself included) convened at the Maker Media headquarters at O'Reilly Media in Sebastopol, California. Take a look behind the scenes of your favorite DIY publications as Goli Mohammadi gives us... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    Sign up for the Make: Newsletter

    Our Make: Newsletter covers news from maker Media, has original columns, Shed deals, and more! You can also read the archives of past issues.


     



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog