Configuration:WiiMotes with CWiiD

From Wah!ki
Revision as of 03:17, 9 January 2011 by Sairuk (talk | contribs) (Created page with "== CWiiD === You can have a WiiMote (or WiiMotes) sync to the PC using CWiiD. This program also runs in daemon mode so it can run constantly in the background behind Wah!Cade syn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CWiiD =

You can have a WiiMote (or WiiMotes) sync to the PC using CWiiD. This program also runs in daemon mode so it can run constantly in the background behind Wah!Cade syncing as though your PC was an actual Wii.

There are numerous methods for starting applications at boot up, but here we will configure Wah!Cade to begin the daemon during startup and destroy it during exit.

Installation

Ubuntu derivatives may follow the Ubuntu Wiki for CWiiD installation instructions

  1. Install CWiiD
  2. Save the CWiiD Daemon Control Script as /home/<user>/bin/wiid
  3. Make the script executable chmod +x /home/<user>/bin/wiid
  4. Configure the script
  5. Use something like the Wah!Cade Startup Wrapper start Wah!Cade.

Wah!Cade Startup Wrapper Example

#!/bin/bash
WAHCADEDIR="/home/user/wahcade"
PYTHON=`which python`

#
### PRE COMMANDS ###
# user commands to run before wahcade
#
# Start the wminput daemon
/home/user/bin/wiid start

#
### WAHCADE COMMAND ###
#
cd ${WAHCADEDIR}
${PYTHON} wahcade.py
wait

#
### POST COMMANDS ###
# user commands to run after wahcade
#
# Stop the wminput daemon
/home/user/bin/wiid stop