Stubby

Full featured, miniature hexapod

 

Programming

To build Stubby's firmware (program) and upload it to the robot, we need a few tools:

The first two items are freely available; the last is relatively cheap (less than $25, much less if you look a bit)

Download source code

You can download all the source code for Stubby from Github. You can either click the "Download Zip" button to download a .zip file of the current revision, or you can clone the entire repository using a Git client. Either way, you will end up with a folder 'stubby' containing a number of folders 'avr', 'doc', 'frame', etc.

Compile the Source Code

If you don't already have it, you need to download an avr-gcc compiler. How to do this depends on what operating system you are running:

Once you have the compiler installed, open a command prompt and navigate to the stubby/avr folder (that you just downloaded). Type 'make'. You should see a bunch of stuff scroll by, ending in something like the following: AVR Memory Usage
----------------
Device: atmega1284p

Program: 30586 bytes (23.3% Full)
(.text + .data + .bootloader)

Data: 4175 bytes (25.5% Full)
(.data + .bss + .noinit)

Upload the program

Finally, you need a way to upload the program to Stubby. I currently use LadyAda's USB Tiny ASP, but there are a million different options out there. Just make sure that whatever you use is compatile with avrdude.

To upload the program, you first need to modify the Makefile to specify what programmer you are using. Look for the line "AVRDUDE_PROGRAMMER=usbtiny" and change usbtiny to be the programmer that you are using. (To find a list of all programmers supported by your version of avrdude, type 'avrdude -c ?'). Once you have changed the Makefile to use your programmer, plug in the programmer to the 6 pin ISP headers on Stubby and type 'make program'.