Controllers

From Pandora Wiki
Revision as of 22:39, 15 September 2010 by Yamara (talk | contribs) (New page: This includes instructions on installing software and configuration to pair Nintendo Wii Wiimotes using Bluetooth to the Pandora, and using them as joystick controllers. This was done unde...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This includes instructions on installing software and configuration to pair Nintendo Wii Wiimotes using Bluetooth to the Pandora, and using them as joystick controllers. This was done under the base install of Angstrom Linux provided on the Pandora, using Hotfix 4. This does not include setting up a sensor bar type setup, but should allow you to use classic controllers that plug into the Wiimote.

Installing the Drivers

Open a Terminal, and run the command "sudo opkg update" (without the quotes). It will give you a warning about responsibility, and asks for your user password. This will update the Angstrom packages stored on NAND.

Then install the Wiimote drivers and software, cwiid, using the command "sudo opkg install cwiid"

Pairing the Wiimote

Make sure Bluetooth is enabled. In Hotfix 4, there's a script to "Toggle Bluetooth Status" in the Pandora menu under the "System" category. A light will turn on on the left hand side of the Pandora if Bluetooth is on, next to the network light.

Open a Terminal, and run the command "wminput" and follow the directions. It will tell you to press 1+2 on the Wiimote to connect. On my Wiimotes, the lights flash and the fourth light on the Wiimote lights solid once paired. If you then quit the wminput application (for instance, by hitting CTRL-C), your Wiimote will un-pair and turn off. I usually just hide the Terminal in the background by minimizing the window while I run game emulators.

You can pair multiple Wiimotes, just run wminput a second time and follow the instructions to pair it. I only have two, and both lit the fourth light.

In PicoDrive, the Sega Genesis emulator, in the controller settings, if you push left or right it will display different joysticks configured. You can set up the buttons for different players there. The Wiimotes appeared as joysticks 1 and 2, in the order in which I paired them.

Changing the Wiimote Configuration

You can edit /etc/cwiid/wminput/default and /etc/cwiid/wminput/buttons to map the buttons of the Wiimote. You should quit wminput and restart them for these changes to take effect. They are plain text files. I edited them using vim from the command line, which is not the most user friendly thing to describe. Because they're system files, I needed to use sudo again, so I ran "sudo vim /etc/cwiid/wminput/default" in Terminal.

By default, the Wiimote is set up to control the mouse with the accelerometer. This means, as you tilt the Wiimote left and right, your mouse will shift around. I found it a bit distracting, and so I commented out two lines in /etc/cwiid/wminput/default so they look like this:

#Plugin.acc.X = REL_X
#Plugin.acc.Y = REL_Y

Also, I use the Wiimote "sideways", like a traditional Nintendo controller. I changed the direction pad to reflect this. Though you can do that within emulator configurations, it seemed handier to just have that set up by default. To do this, make these changes in /etc/cwiid/wminput/buttons

Wiimote.Up = KEY_LEFT
Wiimote.Down = KEY_RIGHT
Wiimote.Left = KEY_DOWN
Wiimote.Right = KEY_UP