This article is part of my series on exploring Linux. In my last article I was pleased at how well Linux handled the docking/undocking of my laptop. My network and dual monitor settings were reconfigured optimally for each scenario.
Today I came across the blog of Matt Cutts who describes how to connect a Wiimote to a Linux PC (a Wiimote is the game controller from a Wii console). I decided to take time out and give it a try.
Long ago I was impressed by the potential of the Wiimote as a control device when I saw Johnny Chung Lee's projects. He came up with some wonderful multi-touch, whiteboard and head tracking VR applications for Windows. More recently, , made an application for the Mac that surfs Google satellite maps using a Wii balance board.
I followed Matt Cutts instructions and had my Wiimote connected in no time:
- I got and installed the application from the terminal by typing: sudo apt-get install wminput wmgui lswm
- I ran lswm and it returned the message: Put Wiimotes in discoverable mode now (press 1+2)...
- lswm was able to properly detect my Wiimote when I pressed 1+2!
- I launched the GUI with the command: wmgui and this is what I saw:
The application was able to read all the information being sent from my Wiimote and attached Nunchuck! Very cool. Now I just need to wait for people to start writing great applications that use the information - like those above that were made for the Windows and Mac environments.
BTW, here is a good articles on how to use a WiiMote in Windows: http://wiihacks.blogspot.com/2006/12/howto-use-wii-mote-in-windows-as-your.html. Here is a Windows application similar to wmgui: WiinRemote.
(Reading the Windows how-to is a very good demonstratation of the difference between the Windows and Linux world -- Half the article deals with how to overcome the limitations of the Microsoft bluetooth implementation and various licensing restructions. Those restrictions just didn't exist in Linux. Rather, in Linux the problem is a lack of people generating useful apps for the controller thus far.)
Remember my problems getting my dual-monitors to work as one seemless desktop? Well, it's been working great lately, but there are some caveats. The wmgui application triggered some of them...
When I ran wmgui, I also got the message: Xlib: extension "RANDR" missing on display ":0.0". The ATI Xinerama feature that allows me to move windows between displays seems to break the RANDR extension (xrandr). The "problem" didn't seem to affect me at all until I did a screenshot for this article. Before I ran wmgui, I could get a screenshot that included my whole desktop spread across both screens. After running wmgui and getting the error, I was only able to get a screenshot of the first monitor and the left half of the second. Not a big problem, but it bears further investigation.
I found more details here https://bugzilla.redhat.com/show_bug.cgi?id=431727 where others were troubleshooting similar problems. Part of my problem may be that xrandr screens cannot be larger than 1920x1200 but my overall desired size is 2960x1050.