Program 3PI

Dear all Have a nice day

I have purchase 3PI robot with programmer from Pololu today. It has demo program and it is working

Now I need to program Maze solving program
Please advice to program using atmel studio 7
Is there ant video step by step

Please advice

Thanks in advance


We do not have any videos for programming the 3pi, however the Pololu AVR Programming Quick Start Guide has a lot of details and can be found with many other helpful references on the “Resources” tab of the 3pi product page.


Thanks Dear The problem is solved

Hi Nathan,

I am also very new to the 3pi having just recently bought it. I was wanted to clarify on a few things on programming the robot:

  1. How do I know that the program has successfully been entered into the robot? (this is after doing the code in ATMEL studio 7, connecting via USB AVR programmer and clicking program towards the device).

  2. When is it generally safe/unsafe to unplug the ISP connector from the robot?

I have been reading the manuals and still require some clarity around these areas. I bought the 3pi as a learning step for me so not sure if all of these questions are things I should already know the answer to.

When you successfully upload a program to the 3pi with Atmel Studio 7, you should see a message in the output window that looks something like this:

Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

The 3pi will also then start running that program. The 3pi only needs to be connected to the computer while the program is uploading, once it has succeeded, you can disconnect the programming cable. Please note, it is important that the 3pi stay powered and connected to the computer with the programming cable while the program is being uploaded. For this reason, we recommend making sure your batteries are charged when programming the 3pi. You should never attempt to program your device if its batteries are drained or uncharged as losing power during programming could permanently disable the AVR on the 3pi.


Hi Brandon,

Thanks for the help. I think I’m just a little confused about programming the robot itself. So to clarify, when I click on the build and run the program in Atmel Studio 7.0 while the programmer is connected to the robot, this isn’t uploading the program to the robot yet? Not sure if my understanding is correct on this.

So then to actually upload the program to the robot, I need to go to Device Programmer and specify the robot and click on program? Once this is done this is when the program is uploaded? I think this is where I’m a little confused at this moment.

The screenshot that you show is something that i get as well when i just build the code and run the code without debugging while connected to the device. However when i remove the ISP cable, the program didn’t seem to be saved in the robot.

Atmel Studio does not give you a separate confirmation that the program was uploaded when you use the quick toolbar options. If you are just using the “Build Solution” options, that does not upload the program.

To be sure, you can go into the device programming menu that you mentioned, select the tool and connect to it, then go to the “Memories” tab and use the “Program” button to upload the specified code. The output when successfully uploading using this procedure should look like this:

Erasing device... OK
Programming Flash...OK
Verifying Flash...OK

The 3pi should also restart and begin running the new code. Most of our examples start by playing a “welcome” note from the buzzer, so you should hear a beep from the buzzer when the 3pi restarts after uploading one of those examples. If you are still having problems, can you specify what program are you trying to load, and what the 3pi does once it loads?


Hi Brandon,

Thanks so much for your help!! Finally figured this out through your guidance. It was purely user error on how I was using Atmel 7. Have been tinkering now with the simple line following code and PID version of it and trying to understand each bit of the code.

I have managed to made very simple modifications to each sample code as well just to help me understand how it works like displaying the sensor values as it runs slowly across the course to give me an actual example of all the explanations on the site.

Still beginning to understand the libraries though and the extent of its contents but still have heaps of sample basic codes to run through to attempt to get me to a better understanding.

Will scour the forums if new questions that i can’t figure out comes up or will create a new topic if I can’t find it in the forum threads.