Raspberry Pi and Wiimote controlled Robot Arm

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.

Raspberry Pi and Wiimote controlled Robot Arm

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.

Raspberry Pi and Wiimote controlled Robot Arm

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

Scroll to Top
Read previous post:
Raspberry Pi Arcade Game Emulator in an Atari Lynx

This project is the summation of various similar tasks to use a Raspberry Pi as a portable games emulator. It's...

Close