The main goal of this project was to develop an easy-to-configure inteface for the Nintendo Wii remote control on Linux-based bluetooth-enabled PCs. The script requires few dependencies and only requires modifying one file to configure.
You can see this software in action at https://vimeo.com/56231320.
This software requires the following software dependencies:
- A GNU/Linux operating system with a loaded uinput module and running bluetooth daemon.
- Python 2.7
- cwiid >= 0.6: https://github.com/abstrakraft/cwiid
- python2-uinput: http://tjjr.fi/sw/python-uinput/
Additionally, the following hardware dependencies need to be met:
- A bluetooth device connected to your PC.
- Wiimote
- Optional:
- Nintendo Wii sensor bar (needed for infrared functionality)
- Nunchuk or other Wiimote extensions
Developed primarily for personal use, there are only a couple existing configurations right now, though it is trivial to add more.
This configuration was built for joystick emulation for side-scrolling games.
This configuration was built for the Left 4 Dead 2 game by Valve. As of right now, the game needs to run in Wine, though a Linux release should be coming very soon, and there is reason to believe this software will work without modification once that is released.
To use this configuration, you would need to copy all of the files in the l4d2 config directory to the Steam/SteamApps/common/left\ 4\ dead\ 2/left4dead2/cfg directory. Use of "autoexec.cfg" should be used at your own discretion. The configuration also works with split-screen mode.
L4D2 In-Game Mappings
- Infrared pointer
- controls pitch and yaw aiming
- A button
- use item
- menu accept
- B (trigger) button
- primary attack
- menu cancel
- D-Pad Up
- toggle flashlight
- menu navigation
- D-Pad Down
- 180 degree spin
- menu navigation
- D-Pad Left
- Previous inventory item
- menu navigation
- D-Pad Right
- Next inventory item
- menu navigation
- Minus button
- toggle melee mode
- Plus button
- scoped weapon zoom
- Home button
- Pause
- Shake Wiimote
- reload (with melee mode off)
- attack (with melee mode on)
- Nunchuk control stick
- move forward, backward, strafe left, right
- Shake Nunchuk
- push back
- Z button (nunchuk)
- crouch
- C button (nunchuk)
- jump
- 1 button
- reset IR axis (to stop spinning out of control. Also essential for melee mode)
- 2 button
- toggle scores
./wiimote.py -p 1 -c l4d2
option "-p" is which controller (1 or 2) is being connected.
option "-c" is the name of the config. See cfg.py for more info.
As soon as you execute the script, press the red sync button behind the battery. The LEDs on the Wiimote will blink for a few seconds. When a connection is established, the Wiimote will vibrate for a brief moment and the LEDs will cycle. Note: Player 1 cycles to the right and Player 2 cycles to the left.