User:Goofster1020/Code Tutorials/Tutorial 1 - Basic Wiimote Usage: Difference between revisions
Jump to navigation
Jump to search
Goofster1020 (talk | contribs) No edit summary |
Goofster1020 (talk | contribs) |
||
Line 41: | Line 41: | ||
===Disconnecting the Wiimote=== | ===Disconnecting the Wiimote=== | ||
If you want to, you can disconnect the Wiimote when you are done using it. This can be done by: | |||
<source lang="c"> | |||
WPAD_Flush(WPAD_CHAN_ALL); | |||
// This will stop all data being transferred between the Wiimote and the Wii. (Not required) | |||
WPAD_Disconnect(WPAD_CHAN_ALL); | |||
// This will turn off all connected Wiimotes. | |||
</source> | |||
==Wiimote Features== | ==Wiimote Features== |
Revision as of 07:22, 27 June 2009
This tutorial explains how to use the wiimote in many different ways:
Basic Usage
Basic Usage
The following section includes the very basic usage of the Wiimote.
If you are using the Wiimote, no matter what, you always need to have this line in your file:
#include <wiiuse/wpad.h>
//This simple line allows your program access to everything available (in LibWiiuse) for the Wiimote.
Initializing the Wiimote
In order to turn on and use the Wiimote, you need to add this line (at least once) in your program:
WPAD_Init();
// This will turn on and allow you to use the Wiimote.
Disconnecting the Wiimote
If you want to, you can disconnect the Wiimote when you are done using it. This can be done by:
WPAD_Flush(WPAD_CHAN_ALL);
// This will stop all data being transferred between the Wiimote and the Wii. (Not required)
WPAD_Disconnect(WPAD_CHAN_ALL);
// This will turn off all connected Wiimotes.