Location of Source Code

Hello,

I am trying to locate the source code for the 3pi Bot, specifically for 328p processor. I know the initial package i installed included the libraries with comments on the functions. I couldn’t find the actual source code (the C or assembly that the libraries call) within that though. I am trying to figure out how the servos and UART work in particular, but I would like to be able to read all the code, not just the notes on how it is supposed to work.

I am sorry if you already posted about this I spent some time attempting to look through other posts but I couldn’t find anything.

Thanks,
Matt Gold

Mine is in
"C:\libpololu-avr\examples\atmega328p\3pi-demo-program"

Yours Simon M.

I am not looking for a program for the 3pi bot. I am looking for the code which makes the 3pi bot programs work.

Hello, Matt.

There are lots of different pieces of code that make the 3pi work.

  • There are the code/design files that define the silicon inside the ATmega328p. This is proprietary code owned by Atmel so won’t be able to see that.
  • There is the code for the Pololu AVR C/C++ Library, which can be compiled and loaded onto the ATmega328p. You can look at this code in the “src” directory if you download the library. This is probably what you should look at.
  • There is the code for the C compiler, avr-gcc. Since GCC is open source, you can look at this code too but I don’t think it will be useful to you.

Please note that you can program the 3pi without using the AVR library or the C compiler, so it’s not like these are integral parts of the 3pi. These tools just help you create a program to load on the 3pi, but there are other harder ways to create the program (e.g. writing the whole thing in assembly.)

–David