I'm trying to connect a Wii remote to the Pi and use it in a python script. I've tried XWiiMote, but I can't get it to compile. All of the other libraries for Wiimotes I've found don't even work anymore (Wiican, CWiid). Has anyone had any luck with this? XWiiMote has python bindings, it's perfect.
Asked
Active
Viewed 2,652 times
1 Answers
3
Start by installing cwiid:
sudo apt-get install python-cwiid
Next set your bluetooth adapter to discoverable mode:
sudo hciconfig hci0 piscan
next open a python console by entering python at the command line.
import the cwiid module:
import cwiid
press 1 and 2 on you wiimote to make it discoverable
then create a reference to the wiimote and save it for later access:
wm = cwiid.Wiimote()
Further details and info on making the connection more reliable are available here.
Steve Robillard
- 34,687
- 17
- 103
- 109
However, I restarted the pi and tried ./autogen.sh again and it may have worked. It's compiling now.
– Ian Hyzy Jan 24 '15 at 07:42