Axon with Ubuntu

+

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.

Step 1:

Download/install all the packages/software in the thread above. Make sure you have the latest version of the bootloader. At the time of this writing, the bootloader was at version 1.1.Copy the bootloader file to the directory where you will be keeping the bootloader.

Step 2:

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:

cd /home/username/My_Robots/Axon_Bots

Step 3:

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.

cd bootloader-1.1

make

Hurrah! it’s compiled!

Step 4:

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:

minicom -s

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…

Step 5:

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!

Well, I got a lot of my information from SoR (this forum thread). Though when I was first reading it, I was noobish 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.

Step 1:

Download the Bootloader from here. Download the latest version. At the time of this writing, the bootloader was at version 1.1. Then, copy it to the directory where you will be keeping the bootloader.

Step 2:

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:

cd /home/username/My_Robots/Axon_Bots

Step 3:

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.

cd bootloader-1.1

make

Hurrah! it’s compiled! Now to actually use the bootloader…

Step 4:

Sorry, I lied, 2 things to do first. First, plug in and turn on the controller.

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:

minicom -s

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…

Step 5:

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 source code. ALL! Done? Ok, moving on…

Open up Terminal again. DON’T START MINICOM! Go to the directory where you have your source code. Type “make” into the command line. This will compile all your code.

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: