|
USB Host Shield 2.0
|
#include <Wii.h>


BluetoothService implementation | |
| void | disconnect () |
| void | ACLData (uint8_t *ACLData) |
| void | Run () |
| void | Reset () |
| void | onInit () |
Additional Inherited Members | |
Protected Member Functions inherited from BluetoothService | |
| bool | checkHciHandle (uint8_t *buf, uint16_t handle) |
Protected Attributes inherited from BluetoothService | |
| void(* | pFuncOnInit )(void) |
| BTD * | pBtd |
| uint16_t | hci_handle |
| uint32_t | l2cap_event_flag |
| uint8_t | identifier |
This BluetoothService class implements support for the Wiimote including the Nunchuck and Motion Plus extension.
It also support the Wii U Pro Controller.
|
virtual |
Used this to disconnect any of the controllers.
Implements BluetoothService.
| bool WII::getButtonPress | ( | ButtonEnum | b | ) |
getButtonPress(Button b) will return true as long as the button is held down.
While getButtonClick(Button b) will only return it once.
So you instance if you need to increase a variable once you would use getButtonClick(Button b), but if you need to drive a robot forward you would use getButtonPress(Button b).
| b | ButtonEnum to read. |
| bool WII::getButtonClick | ( | ButtonEnum | b | ) |
getButtonPress(Button b) will return true as long as the button is held down.
While getButtonClick(Button b) will only return it once.
So you instance if you need to increase a variable once you would use getButtonClick(Button b), but if you need to drive a robot forward you would use getButtonPress(Button b).
| b | ButtonEnum to read. |
| uint16_t WII::getAnalogHat | ( | AnalogHatEnum | a | ) |
|
inline |
|
inline |
|
inline |
| void WII::setAllOff | ( | ) |
| void WII::setLedStatus | ( | ) |
| uint8_t WII::getBatteryLevel | ( | ) |
|
inline |
Return the Wiimote state.
|
inline |
|
inline |
|
inline |
|
inline |
| float WII::getWeight | ( | BalanceBoardEnum | pos | ) |
Used to get the weight at the specific position on the Wii Balance Board.
| pos | BalanceBoardEnum to read from. |
| float WII::getTotalWeight | ( | ) |
|
inline |
Used to get the raw reading at the specific position on the Wii Balance Board.
| pos | BalanceBoardEnum to read from. |
| void WII::IRinitialize | ( | ) |
Initialises the camera as per the steps from: http://wiibrew.org/wiki/Wiimote#IR_Camera
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Use this to check if the camera is enabled or not. If not call WII::IRinitialize to initialize the IR camera.
Used to pass acldata to the services.
| ACLData | Incoming acldata. |
Implements BluetoothService.
|
protectedvirtual |
Used to run part of the state machine.
Implements BluetoothService.
|
protectedvirtual |
|
protectedvirtual |
Called when the controller is successfully initialized. Use attachOnInit(void (*funcOnInit)(void)) to call your own function. This is useful for instance if you want to set the LEDs in a specific way.
Implements BluetoothService.
| bool WII::wiimoteConnected |
| bool WII::nunchuckConnected |
| bool WII::motionPlusConnected |
| bool WII::wiiUProControllerConnected |
| bool WII::wiiBalanceBoardConnected |
| int16_t WII::accXwiimote |
| int16_t WII::accYwiimote |
| int16_t WII::accZwiimote |
| int16_t WII::accXnunchuck |
| int16_t WII::accYnunchuck |
| int16_t WII::accZnunchuck |
| float WII::gyroPitch |
This is the pitch calculated by the gyro - use this to tune WII::pitchGyroScale.
| float WII::gyroRoll |
This is the roll calculated by the gyro - use this to tune WII::rollGyroScale.
| float WII::gyroYaw |
This is the yaw calculated by the gyro - use this to tune WII::yawGyroScale.
| uint16_t WII::pitchGyroScale |
| uint16_t WII::rollGyroScale |
| uint16_t WII::yawGyroScale |
| int16_t WII::gyroYawRaw |
| int16_t WII::gyroRollRaw |
| int16_t WII::gyroPitchRaw |
| int16_t WII::gyroYawZero |
| int16_t WII::gyroRollZero |
| int16_t WII::gyroPitchZero |