How to recompile GoPiGo Firmware from scratch?


Are there directions for compiling the GoPiGo firmware from scratch?
I tried last night using rev 1.6.4 of the Arduino software, and got a different hex file than is distributed. (As an aside, finding the hex file on my Mac was task and half!) I suspect I missed a step.

Can anybody give me pointers or tips on compiling my own image from scratch?

I am interested in implementing PID velocity controllers for the two motors using the encoder feedback. If somebody else has already done this, then I’m not interested in reinventing the wheel. If nobody else has done it, then I’m interested in feeding my code back to the community.

But my first step is to make sure that I can regenerate the existing code, before I try changing anything and wondering why things don’t work.



The Hex file generated would be different. We have seen that a lot of times the Arduino IDE would be producing HEX files which do look different.

The easiest way to verify that the hex file was correct is to burn it to the GoPiGo and use sudo i2cdetect -y 1. If you see 08 in there, then the code was burnt successfully.

The easiest way to find if the changes that you have made are there in the firmware is to change the firmware version to a new number and verify that the software reports the same as you had put there.



Oh that’s a shame! I hate using embedded tools that don’t produce the same output every time they are run, when given the same input. Oh well.

I am less concerned about validating that my changes are in the firmware than I am about validating the firmware to begin with. But I guess I’ll just have to go with the time honored technique of “If it looks like its running, it must work”.

Any thoughts regarding the PID velocity controller for the wheels? Good idea? Bad idea? Already done? Will never work?



Oh yeah… can you tell me:

  • What rev of the Arduino software did you use to produce the released code, and on what platform did you run it?
  • Did you, in fact use the Arduino software to produce the released code?
  • Are there any other changes to the boards.txt or equivalent files that I need to make in order to compile the code?
  • Can you give me any other tips I might find useful when compiling the code myself.

And, more importantly…


Firmware V16 reproduction

Hey wpd,

We did use the Arduino software to produce the released code.
We compiled on a PC, using Arduino (1.0.5-r2 works).
In the latest version of the code, we have fuse settings and changes to the clock speeds; we invoke the div8 on it to make it more stable.

Hope that helps!


re PID;

Im having a hard time finding the source, but I have it downloaded. You want to look closely at if you can find it.

I’ve tried 3 times and failed to duplicate it, but I’m getting ready to try again. I think it is that good.