weight

Location

$REVOLUTION_SDK_ROOT/build/demos/kpaddemo

Description

This sample program confirms the sensor values reported from the four corners of the Wii Balance Board and the body weight calculated from those values when using the KPAD library.

Initialization

Just as with the Wii Remote, the Wii Balance Board must be registered with the Wii Console. Although registration information is saved on the Wii Console, rather than allowing it to be saved as it was during the development of the Japanese version of WiiFit, it is saved in WiiFit save data. It is therefore necessary to register a special buffer in the WPAD library using the WPADRegisterBLCWorkarea function before initializing the WPAD library because it is necessary to get registration information in the save data in the case of applications for the Japanese market.

Calibration

The Wii Balance Board must be calibrated first. Calibration is performed within the KPAD library. Note that sensor values obtained during calibration cannot be used.

Test Features

The following features can be tested using a Nintendo GameCube Controller connected to P1.

A ButtonResets the zero point.
B ButtonRecalculates the body weight with temperature and gravity corrections applied.

Source Code Files

weight.c Gets the weight and values for the four corner sensors of the Wii Balance Board and displays them on the screen.

See Also

None.

Revision History

2008/04/17 Initial version.


CONFIDENTIAL