public class PSPNXController extends I2CSensor
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION, retryCount
currentMode, modes
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW
Constructor and Description |
---|
PSPNXController(I2CPort port) |
PSPNXController(I2CPort port,
int address) |
PSPNXController(Port port) |
PSPNXController(Port port,
int address) |
Modifier and Type | Method and Description |
---|---|
int[] |
getButtons()
Each bit in the short byte represents the boolean (pressed or
not pressed) of a button.
|
int |
getLeftX() |
int |
getLeftY() |
byte |
getMode()
Returns the current operating mode of the sensor.
|
int |
getRightX() |
int |
getRightY() |
void |
powerUp(boolean activate) |
void |
setADPAMode(boolean activate)
Use ADPA mode only if you are trying to connect more
than one I2C sensor to a single port.
|
void |
setDigitalMode(boolean activate) |
fetchString, getAddress, getData, getData, getPort, getProductID, getRetryCount, getVendorID, getVersion, sendData, sendData, sendData, setAddress, setRetryCount
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModes
close, releaseOnClose
public PSPNXController(I2CPort port)
public PSPNXController(I2CPort port, int address)
public PSPNXController(Port port)
public PSPNXController(Port port, int address)
public void powerUp(boolean activate)
public int[] getButtons()
public void setDigitalMode(boolean activate)
public int getLeftX()
public int getLeftY()
public int getRightX()
public int getRightY()
public byte getMode()
public void setADPAMode(boolean activate)
activate
-