NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
bool ReadSensorMSPlayStation ( const byte  port,
const byte  i2caddr,
byte &  btnset1,
byte &  btnset2,
byte &  xleft,
byte &  yleft,
byte &  xright,
byte &  yright 
)
inline

Read mindsensors playstation controller values.

Read playstation controller values from the mindsensors playstation sensor. Returns a boolean value indicating whether or not the operation completed successfully. The port must be configured as a Lowspeed port before using this function.

Parameters
portThe sensor port. See Input port constants.
i2caddrThe sensor I2C address. See sensor documentation for this value.
btnset1The button set 1 values. See MindSensors PSP-Nx button set 1 constants.
btnset2The button set 2 values. See MindSensors PSP-Nx button set 2 constants.
xleftThe left joystick x value.
yleftThe left joystick y value.
xrightThe right joystick x value.
yrightThe right joystick y value.
Returns
The function call result.
Examples:
ex_ReadSensorMSPlayStation.nxc.