Using the IRobot Create's Command Module With Linux
by zachninme in Circuits > USB
14880 Views, 14 Favorites, 0 Comments
Using the IRobot Create's Command Module With Linux
Since iRobot hasn't provided linux users with a way to use the command module, I had to figure it out myself.
Don't be intimidated, its not hard at all, really. All you need to do is run a couple of scripts.
Lets get started, shall we?
Don't be intimidated, its not hard at all, really. All you need to do is run a couple of scripts.
Lets get started, shall we?
Get the Goods
For this tutorial, I'm assuming you have an apt-based package manager. (i.e. you use a Debian derivative, or an Ubuntu derivative) Simply because apt = good.
If you don't, I assume that there are the same packages for yum, but I can't test that. (Fedora doesn't like me)
Now, you must run a long and complicated thingymabober:
And yes, removing that package is safe. (Tip from here) If it gives you an error saying its not installed, you're good, don't worry.
If you don't, I assume that there are the same packages for yum, but I can't test that. (Fedora doesn't like me)
Now, you must run a long and complicated thingymabober:
sudo apt-get install avrdude avr-libc gcc-avrsudo apt-get remove brltty
And yes, removing that package is safe. (Tip from here) If it gives you an error saying its not installed, you're good, don't worry.
Write/Get a Program
Heres the part where you write your program. But to test it out, lets use a demo program.
The command module comes with a CD, and on it, there are 3 demo programs.To test, use the input program. Copy the folder "input" to somewhere on your computer, such as /home/user/avr/input.
The command module comes with a CD, and on it, there are 3 demo programs.To test, use the input program. Copy the folder "input" to somewhere on your computer, such as /home/user/avr/input.
Edit Makefile
If you wrote your own program, get a makefile from the CD. If you just copied it over, then you already have it.
Open it up, and use find/replace to edit these two lines:
To...
That wasn't too hard, was it?
Open it up, and use find/replace to edit these two lines:
86: DEBUG = dwarf-2...204: AVRDUDE_PORT = com9 # programmer connected to serial device(Those numbers are line numbers, if you want to do it that way)
To...
86: DEBUG = stabs...204: AVRDUDE_PORT = /dev/ttyUSB0 # programmer connected to serial device
That wasn't too hard, was it?
Compile/Download
It hasn't been that hard so far, and this step is no different:
First, plug in the command module, via USB, and make sure it is on. Hit the Reset button. Then go onto your computer and open a terminal. Navigate to the directory where your program/makefile are, and type:
Now, go onto your create, and remove the cable. Then press the reset button, and your program will start!
Congratulations!
First, plug in the command module, via USB, and make sure it is on. Hit the Reset button. Then go onto your computer and open a terminal. Navigate to the directory where your program/makefile are, and type:
make allmake program
Now, go onto your create, and remove the cable. Then press the reset button, and your program will start!
Congratulations!