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


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top