Public Member Functions |
| | WII (BTD *p, bool pair=false) |
| | Constructor for the WII class.
|
| void | attachOnInit (void(*funcOnInit)(void)) |
| | Used to call your own function when the device is successfully initialized.
|
|
| bool | getButtonPress (ButtonEnum b) |
| | getButtonPress(Button b) will return true as long as the button is held down.
|
|
bool | getButtonClick (ButtonEnum b) |
| void | pair (void) |
| | Call this to start the pairing sequence with a controller.
|
| uint8_t | getAnalogHat (HatEnum a) |
| | Used to read the joystick of the Nunchuck.
|
| uint16_t | getAnalogHat (AnalogHatEnum a) |
| | Used to read the joystick of the Wii U Pro Controller.
|
| float | getPitch () |
| | Pitch calculated from the Wiimote.
|
| float | getRoll () |
| | Roll calculated from the Wiimote.
|
| float | getYaw () |
| | This is the yaw calculated by the gyro.
|
| void | setAllOff () |
| | Used to set all LEDs and rumble off.
|
| void | setRumbleOff () |
| | Turn off rumble.
|
| void | setRumbleOn () |
| | Turn on rumble.
|
| void | setRumbleToggle () |
| | Toggle rumble.
|
| void | setLedRaw (uint8_t value) |
| | Set LED value without using the LEDEnum.
|
| void | setLedOff () |
| | Turn all LEDs off.
|
| void | setLedOff (LEDEnum a) |
| | Turn the specific LEDEnum off.
|
| void | setLedOn (LEDEnum a) |
| | Turn the specific LEDEnum on.
|
| void | setLedToggle (LEDEnum a) |
| | Toggle the specific LEDEnum.
|
| void | setLedStatus () |
| | This will set the LEDs, so the user can see which connections are active.
|
| uint8_t | getBatteryLevel () |
| | Return the battery level of the Wiimote.
|
| uint8_t | getWiiState () |
| | Return the Wiimote state.
|
|
| float | getWiimotePitch () |
| | Pitch and roll calculated from the accelerometer inside the Wiimote.
|
|
| float | getNunchuckPitch () |
| | Pitch and roll calculated from the accelerometer inside the Nunchuck.
|
|
| float | getWeight (BalanceBoardEnum pos) |
| | Used to get the weight at the specific position on the Wii Balance Board.
|
| float | getTotalWeight () |
| | Used to get total weight on the Wii Balance Board.
|
| uint16_t | getWeightRaw (BalanceBoardEnum pos) |
| | Used to get the raw reading at the specific position on the Wii Balance Board.
|
|
You will have to set ENABLE_WII_IR_CAMERA in settings.h to 1 in order use the IR camera.
|
| void | IRinitialize () |
| | Initialises the camera as per the steps from: http://wiibrew.org/wiki/Wiimote#IR_Camera.
|
| uint16_t | getIRx1 () |
| | IR object 1 x-position read from the Wii IR camera.
|
| uint16_t | getIRy1 () |
| | IR object 1 y-position read from the Wii IR camera.
|
| uint8_t | getIRs1 () |
| | IR object 1 size read from the Wii IR camera.
|
| uint16_t | getIRx2 () |
| | IR object 2 x-position read from the Wii IR camera.
|
| uint16_t | getIRy2 () |
| | IR object 2 y-position read from the Wii IR camera.
|
| uint8_t | getIRs2 () |
| | IR object 2 size read from the Wii IR camera.
|
| uint16_t | getIRx3 () |
| | IR object 3 x-position read from the Wii IR camera.
|
| uint16_t | getIRy3 () |
| | IR object 3 y-position read from the Wii IR camera.
|
| uint8_t | getIRs3 () |
| | IR object 3 size read from the Wii IR camera.
|
| uint16_t | getIRx4 () |
| | IR object 4 x-position read from the Wii IR camera.
|
| uint16_t | getIRy4 () |
| | IR object 4 y-position read from the Wii IR camera.
|
| uint8_t | getIRs4 () |
| | IR object 4 size read from the Wii IR camera.
|
| bool | isIRCameraEnabled () |
| | Use this to check if the camera is enabled or not.
|
Data Fields |
| float | gyroPitch |
| | This is the pitch calculated by the gyro - use this to tune WII::pitchGyroScale.
|
| float | gyroRoll |
| | This is the roll calculated by the gyro - use this to tune WII::rollGyroScale.
|
| float | gyroYaw |
| | This is the yaw calculated by the gyro - use this to tune WII::yawGyroScale.
|
|
| bool | wiimoteConnected |
| | Variable used to indicate if a Wiimote is connected.
|
| bool | nunchuckConnected |
| | Variable used to indicate if a Nunchuck controller is connected.
|
| bool | motionPlusConnected |
| | Variable used to indicate if a Nunchuck controller is connected.
|
| bool | wiiUProControllerConnected |
| | Variable used to indicate if a Wii U Pro controller is connected.
|
| bool | wiiBalanceBoardConnected |
| | Variable used to indicate if a Wii Balance Board is connected.
|
|
| int16_t | accXwiimote |
| | Accelerometer values used to calculate pitch and roll.
|
|
| float | pitchGyroSpeed |
| | The speed in deg/s from the gyro.
|
|
| uint16_t | pitchGyroScale |
| | You might need to fine-tune these values.
|
|
| int16_t | gyroYawRaw |
| | Raw value read directly from the Motion Plus.
|
|
| int16_t | gyroYawZero |
| | These values are set when the controller is first initialized.
|
Protected Member Functions |
| bool | checkHciHandle (uint8_t *buf, uint16_t handle) |
| | Used to check if the incoming L2CAP data matches the HCI Handle.
|
Protected Attributes |
| void(* | pFuncOnInit )(void) |
| | Pointer to function called in onInit().
|
| BTD * | pBtd |
| | Pointer to BTD instance.
|
| uint16_t | hci_handle |
| | The HCI Handle for the connection.
|
| uint32_t | l2cap_event_flag |
| | L2CAP flags of received Bluetooth events.
|
| uint8_t | identifier |
| | Identifier for L2CAP commands.
|
BluetoothService implementation |
| void | disconnect () |
| | Used this to disconnect any of the controllers.
|
| void | ACLData (uint8_t *ACLData) |
| | Used to pass acldata to the services.
|
| void | Run () |
| | Used to run part of the state machine.
|
| void | Reset () |
| | Use this to reset the service.
|
| void | onInit () |
| | Called when the controller is successfully initialized.
|