WBC Sample Demos

Location

$REVOLUTION_SDK_ROOT/build/demos/wbcdemo

Compilation

Change directories to $REVOLUTION_SDK_ROOT/build/demos/wbcdemo and enter make. An executable file (.elf) will be generated under the path $REVOLUTION_SDK_ROOT/RVL/bin/demos/wbcdemo/.

Running the Demos

Move to the $REVOLUTION_SDK_ROOT/RVL/bin/demos/wbcdemo/ directory and perform the following steps:

Description

handling_weight Demo description:
This demo consists of handling.c from wpadHealthdemo, with weight conversion processing added.
It converts the values from the four balance sensors on the Wii Balance Board legs to weight (kg) and displays them.

The weight values shown on the right of the screen have the following meanings:

Wt:Average value over two seconds.
Wt(TGC):Average value over two seconds, corrected for temperature and gravitational acceleration.


Operations Described:
START:Sets the zero point. Takes the average of the raw WBC values over a two-second period and uses the WBCSetZEROPoint function to set it as the zero point.
+Control Pad Left:Gets the average weight value. Takes the average value over two seconds.


Caution:
  • Because of balance sensor characteristics, you must set the zero point (press START when there is nothing on Wii Balance Board accessory) every time you want to accurately measure weight.
  • In the demo, temperature is updated immediately before the zero point is set. The temperature update command is executed inside the WBCSetZEROPoint function.
  • simple_wbc Demo description:
    This demo clearly shows how to control Wii Balance Board accessory. The code is a simplified version of the handling_weight demo.
    Values for the four balance sensors are converted to weight (kg) and the total is displayed on the Wii console output. (Nothing appears on the TV screen.)


    Operations Described:
    A Button:Sets the zero point. In this demo, the output values of Wii Balance Board accessory are set unchanged by the WBCSetZEROPoint function.
    balance Demo description:
    This is the simple_wbc demo with an added center of gravity display.
    Values for the four balance sensors are converted to weight (kg) and the total is displayed on the Wii console. (Nothing appears on the TV screen.)


    Operations Described:
    A Button:Sets the zero point. In this demo, the output values of Wii Balance Board accessory are set unchanged by the WBCSetZEROPoint function.

    See Also

    WBC Functions

    Revision History

    2008/02/26 Added the simple_wbc and balance demos.
    2007/11/15 Initial version.


    CONFIDENTIAL