This sample program verifies the KPAD library's Wii MotionPlus functionality. Using it, you can display any value that is possible to obtain from the library, and you can edit all modifiable values.
|MPLS PRAMS||Edits modifiable parameters using the KPAD library. The following items can be edited: Zero-Point Tolerance, Zero-Point Drift Correction, Attitude Correction, Acceleration Correction, and DPD Correction. The state of each item is also displayed.|
|KPAD DEMO MAN||Explains how to operate the sample demo.|
|OBJ||Indicates the position of the object captured by the DPD. The rectangle is the sensor range.|
|MPLS||Indicates the mpls value in the
|ANGLE||Indicates the angle value in the
|DIR||Indicates the dir value in the
|MPLSCB||Displayed, together with the reason value, when a callback registered with the
|SMP.RATE||Displays how many registered callbacks of the
The Wii remote controller buttons have these functions in this demo:
The values can be edited using the digital buttons. Move the cursor with the Wii remote +Control Pad. Use the A Button to either turn on or increment the selected digit. Use the B Button to either to turn off or decrement the selected digit.
Press the 1 Button on the Wii remote to call the
KPADResetMpls function and reset the internal state of all data processing related to the Wii MotionPlus. Press the 2 Button to call the
KPADSetMplsDirection functions and reset the Wii remote's angle and attitude data.
A block is initially displayed in the center of the screen. This shape is rotated based on the attitude data, using the fulcrum as the center point. The position of the fulcrum can be moved forward and back by three levels with the + Button and the - Button on the Wii remote.
The Nintendo GameCube controller (optional, connected to P1) buttons have these functions in this demo:
The sample program starts up the Wii MotionPlus in normal mode immediately after the Wii remote is paired. The mode can be changed with the GameCube buttons.
|A Button||Change to normal mode|
|B Button||Change to bypass mode|
|L Button||Change to a mode allowing simultaneous use of the Nunchuk|
|R Button||Change to a mode allowing simultaneous use of the Classic Controller|
The sensor bar can be turned on or off using the GameCube buttons.
|X Button||Turn the sensor bar ON|
|Y Button||Turn the sensor bar OFF|
Pressing the +Control Pad Up Button on the GameCube Controller connected to P1 resets the Wii MotionPlus zero point using
While the Wii MotionPlus is being calibrated by the KPAD library the block darkens. It returns to its original color as processing approaches completion.
||Contains the application startup and framework source.|
||Form the main body of the application that performs a variety of operations using the controller values. These application files initialize and load controllers and contain the source code for the CPU processing and rendering that is performed every frame.|
||The collection of subroutines for drawing simple graphics.|
2014/06/18 Fix some outdated comments.
2013/05/08 Automated cleanup pass.
2008/12/04 Initial version.