The Axon microcontroller is a great board for controlling robots. It’s open-sourced, which makes it user friendly, it has a built in 5V logic regulator which is used to feed 16 ADC ports, a whooping 3300uf capacitor to reduce the noise created with control of at least 29 servos, runs at 16MHz, has all its UART ports pinned out for easy acces, and a bootloader to boot (ugh, sorry, bad pun…), so you don’t need one of those fancy (or not so much) programmers. This is all great, but what happens when you want to use the USB outputting and the bootloader on an OS which is not Windows? Well, in this tutorial, I explain how to use the Axon on Ubuntu, one of the most popular Linux distros in the world!
NOTE: I can only guaratee this to work with the original Axon Source code, and not Webbot Lib. As soon as I have tested it out, I will update this tutorial, or write a new one altogether, to demonstrate any new methods.
Update!: Turns out if you set up your IDE right, WebbotLib will give you a hex file after compilation. Just link the bootloader to that instead.
Starting with the Bootloader…
Well, I got a lot of my information from SoR (this forum thread). Though when I was first reading it, I was noobish to these Ubuntu Teminal commands. I’ve learned learned a great deal of stuff about Ubuntu lately, so now I write a more step by step approach so other noobs won’t have as hard of a time as me.
Download/install all the packages/software in the thread above.
Open up terminal. You want to navigate to the folder where you stored the tar.bz, NOT to the tar.bz yourself! The command will look something like this:
Now you want to compile it. First you must extract the files.
tar -zxvf bootloader-1.1.tar.gz
Then you want to go to the directory and compile the code.
Hurrah! it’s compiled!
2 things to do before we can actually use the bootloader. First, plug in and turn on the controller.
Plug your Axon into a USB port. Type the following to set up baud rate on your computer:
stty -F /dev/ttyUSB0 115200
Now we must run minicom to be able to connect with the Axon:
Go to “Serial Port Setup” and change the serial device to /dev/ttyUSB0
Now save the configuration as default. If you run minicom, you should connect sans problème!
Close the Terminal…
NOW we will use the bootloader!
Copy all the files in the newly compiled bootloader folder to the folder where you have all your Axon HEX file. ALRIGHT! Done? Ok, moving on…
Open up Terminal again. DON’T START MINICOM! Go to the directory where you have your hex file code. Type “make” if you are using the original Axon source code, as it may need to be re-compiled.
Once there are no errors, you are ready to bootload! Make sure minicom is not running, then type the following command to initiate bootload:
./bootloader -d /dev/ttyUSB0 -b 115200 -p file.hex
(file.hex is the file you will be programming to the Axon, change “file” to whatever the hex doc is going to be called.)
Once it starts, power on the Axon and wait for programming to finish! You’re done!