Mergeit ApS
Open itMerge itDevelop it

This is a quick hack to show the balance board output in a X/Y axis system. It has only been tested on Fedora 9, but should be relatively easy to run on other systems, including cross-compiling for windows.

The source code:

wiibalance-20090414205958.tar.gz

Wii Balance Board example application

This is a quick hack to show the balance board output in a X/Y axis system. It has only been tested on Fedora 9, but should be relatively easy to run on other systems,  including cross-compiling for windows. Requirements to build:

  • qt4
  • qmake (the qt4 version)
  • c++ toolchain
  • wiiuse v0.12 (need to apply patch, see below)

On Fedora you need packages:

  •  qt-devel-4.<something> (includes qmake-qt4 on fedora)
  • gcc/g++ (well, you should know this already...)
  • bluez-devel
  • patch


Any hardcore developer should already have the appropriate packages anyway for their favorite distro, or not?

The source includes a patch against wiiuse v0.12, which adds the balance board support. This patch has been sent upstream (25-Mar-2009) to the wiiuse developer(s) and is under review. If and when this patch is accepted, you should be able to upgrade to a  newer version of wiiuse, but that might require some changes. Until then, you just need to do some more work.

HowTo build

  1. get the wiibalance code her 
  2. get the wiiuse library v0.12 at http://www.wiiuse.net/
  3. do

    $ cd your/build/root
    $ tar xfz /..../wiibalance-YYYYMMDDHHMMSS.tar.gz
    $ cd wiibalance-YYYYMMDDHHMMSS
    $ tar xfz /..../wiiuse_v0.12_src.tar.gz
    $ cd wiiuse_v0.12/
    $ patch -p1 < ../wiiuse_v0.12-balance.board.patch
    $ make
    $ cd ..
    $ qmake-qt4
    $ make

You now should have a binary `wiibalance' in the current directory. However, running it is a bit more awkward because the wiiuse.so cannot be found by 
default and you don't want to mess with your ldconfig. Fortunately, this can be handled on the command line fairly easily. When running bash, then you can do:

    $ LD_LIBRARY_PATH="$PWD/wiiuse_v0.12/src/release-$(gcc -v 2>&1|grep ^Target:|cut -d' ' -f2)" ./wiibalance

The LD_LIBRARY_PATH is used as a search path for the shared object. Note that the complexity of this line is largely because wiiuse tries to compile for a 
specific target and saves the result in a directory for that target. The 
expansion was taken from wiiuse's Makefile. Also note that building a 
debug-version of wiiuse will create a different target directory (that wasted 
half an hour of my life to find out...).

If you use another shell than bash (or highly incompatible bourne shell derivatives), then you should be able to find out a syntax that works for you, ymmv.

Wiibalance is (c) 2009 B. Stultiens and available under GPLv3.

nyheder

Følg VM kampene live på din SNOM telefon

I perioden under FIFA VM 2010, tilbyder snom en gratis resultats ticker til alle brugere af snom...

Nyt samarbejde med nVidia

Brug af grafikkort (GPU'er) til supercomputing er på det seneste blevet et yderst prisbilligt og...

Seneste blog

ingen nyheder i denne liste

Kontakt

Bertho Stultiens