I received a robot arm as a birthday present, but after about the first day the controller that came with it became a bit dull to use. Later I bought the usb controller that was made for the robot, but once again the canned software was limited and dull after a while. I was planning to hack the arm anyway, so I started the solution to end my boredom.
Step 1: Components
Some programming experience would be nice, but it isnāt required. Iāll try to keep everything simple. (Knowing me things might not go according to plan)
Parts:
Computer (I used a raspberry pi) with a python compiler, along with libusb, python-pip, pyusb, and cwiid installed
Bluetooth Connection/Dongle (for Wiimote)
OWI-535 Robotic Arm Edge with USB extension kit
Spare time to have fun with it or show off to your coworkers and friends!
Step 2: Connecting to the robot
Since Iām doing this on a raspberry pi, I will explain everything the way I got the arm to run on it. Most everything is well documented for Windows and Mac ā only a google search away so it shouldnāt be much of a problem.
First we need to install libusb. Open a terminal and type:Ā Ā Ā sudo apt-get install libusb-dev
Next we need to install python-pip. In the terminal type:Ā Ā Ā Ā sudo apt-get install python-pip
And we need to install pyusb. In the terminal type:Ā Ā Ā Ā sudo pip install pyusb
I assume that the robot is all built and everything functions properly; if not, I noticed several instructables on how to assemble it so I wonāt go over that.
Now, if your robot is connected through the usb you can use the List USB command by typing ālsusbā (without quotes of course) into the terminal. You should see a device with a vendor ID of 1267 and a product ID of 0. If not, double check your connections, batteries and see if the switch is on.
Step 3: A much better controller
I couldnāt think of any controller greater and funner to use than a game console controller. I used a wiimote because I actually have one, and it is really easy program. With that said, Iām sure other controllers would work just as well, and maybe they are easier to use (I donāt have any others to try so I donāt know).
The wiimote uses bluetooth to connect so you will need a bluetooth dongle if your computer doesnāt have it built in. Iām using a cirago bluetooth/wifi dongle to connect, there are plenty of tutorials on installing the stuff needed to get bluetooth running on the raspberry pi. I installed bluez through the terminal, but Iāll assume that you have bluetooth fully functioning.
We need one more download to connect to the wiimote. Pop open that terminal and type:Ā Ā Ā sudo apt-get install python-cwiid
You can see a list of the bluetooth devices by typing:Ā Ā Ā hcitool scan
Press one and two on the wiimote to set it in a discovery mode. Then the wiimote will pop up with its address and the name Nintendo will be there somewhere.
We are now ready to begin using the wiimote
For more detail:Ā Raspberry Pi and Wiimote controlled Robot Arm