Difference between revisions of "User:Goofster1020/Code Tutorials/Tutorial 1 - Basic Wiimote Usage"

From WiiBrew
Jump to navigation Jump to search
Line 2: Line 2:
 
This tutorial explains how to use the wiimote in many different ways:
 
This tutorial explains how to use the wiimote in many different ways:
 
<br><br>
 
<br><br>
 +
'''[[#Useful Codes | Useful Codes]]
 +
*[[#Wiimote Channels | Wiimote Channels]]
 +
*[[#Wiimote Buttons | Wiimote Buttons]]
 +
**[[#Wiimote Codes | Wiimote Codes]]
 +
**[[#Nunchuk Codes | Nunchuk Codes]]
 +
**[[#Classic Controller Codes | Classic Controller Codes]]
 +
**[[#Guitar Codes | Guitar Codes]]
 +
*[[#Wiimote Expansions | Wiimote Expansions]]
 +
*[[#Wiimote Errors | Wiimote Errors]]
 
'''[[#Basic Usage | Basic Usage]]'''
 
'''[[#Basic Usage | Basic Usage]]'''
 
*[[#Initializing the Wiimote | Initiallizing the Wiimote]]
 
*[[#Initializing the Wiimote | Initiallizing the Wiimote]]
Line 23: Line 32:
 
*[[#Wiimote Callbacks | Wiimote Callbacks]]
 
*[[#Wiimote Callbacks | Wiimote Callbacks]]
 
<br>
 
<br>
 +
==Useful Codes==
 +
===Wiimote Channels===
 +
===Wiimote Buttons===
 +
====Wiimote Codes====
 +
====Nunchuk Codes====
 +
====Classic Controller====
 +
====Guitar Codes====
 +
===Wiimote Expansions===
 +
===Wiimote Errors===
 
==Basic Usage==
 
==Basic Usage==
 
''The following section includes the very basic usage of the Wiimote.''
 
''The following section includes the very basic usage of the Wiimote.''

Revision as of 07:39, 27 June 2009

This tutorial explains how to use the wiimote in many different ways:

Useful Codes

Basic Usage

Wiimote Features

Expansions

Detection

Other


Useful Codes

Wiimote Channels

Wiimote Buttons

Wiimote Codes

Nunchuk Codes

Classic Controller

Guitar Codes

Wiimote Expansions

Wiimote Errors

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.

Wiimote Features

Using the Buttons

Using the Joysticks

Using the Accelerometer

Using the IR

Using Rumble

Expansions

Nunchuk

Classic Controller

Guitar

Balance Board

Detection

Wiimote Detection

Expansion Detection

Other

Wiimote Settings

Wiimote Callbacks