public class SMUX
extends lejos.nxt.I2CSensor
lejos.nxt.addon.SensorMux
class, Xander's tutorial on how to use
smuxes, his RobotC driver suite and the HiTechnic Website.SMUX
,
lejos.nxt.addon.SensorMux
,
http://www.breigh.com/xander/HTSMUX-Tutorial-LATEST.pdf,
http://botbench.com/driversuite/,
https://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NSX2020address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, GREEN, GREEN_INDEX, MAX_AD_RAW, MAX_TYPE, MIN_TYPE, MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, 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
Modifier and Type | Method and Description |
---|---|
boolean |
batteryGood() |
byte |
getAnalogRegister(int port) |
int |
getData(int register,
byte[] buf,
int len)
Not sure why this is here
|
int |
getData(int register,
byte[] buf,
int offset,
int len)
Not sure why this is here
|
static SMUX |
getInstance(lejos.nxt.SensorPort port)
Gets an instance of a smux.
|
byte |
getModeRegister(int port) |
int |
getSensorType(int port) |
byte |
getStartI2CRegister(int port) |
byte |
getTypeRegister(int port) |
int |
sendData(int register,
byte value)
Not sure why this is here
|
int |
sendData(int register,
byte[] buf,
int len)
Not sure why this is here
|
int |
sendData(int register,
byte[] buf,
int offset,
int len)
Not sure why this is here
|
byte |
status() |
public static SMUX getInstance(lejos.nxt.SensorPort port)
port
- the port the smux is attached topublic byte status()
public boolean batteryGood()
public byte getAnalogRegister(int port)
port
- the port on the smux the sensor is attached to. 0 basedpublic byte getModeRegister(int port)
port
- the port on the smux the sensor is attached to. 0 basedpublic byte getTypeRegister(int port)
port
- the port on the smux the sensor is attached to. 0 basedpublic int getSensorType(int port)
port
- public byte getStartI2CRegister(int port)
port
- the port on the smux the sensor is attached to. 0 basedpublic int getData(int register, byte[] buf, int len)
getData
in class lejos.nxt.I2CSensor
register
- buf
- len
- I2CSensor.getData(int, byte[], int)
public int getData(int register, byte[] buf, int offset, int len)
getData
in class lejos.nxt.I2CSensor
register
- buf
- len
- I2CSensor.getData(int, byte[], int, int)
public int sendData(int register, byte[] buf, int len)
sendData
in class lejos.nxt.I2CSensor
register
- buf
- len
- I2CSensor.sendData(int, byte[], int)
public int sendData(int register, byte[] buf, int offset, int len)
sendData
in class lejos.nxt.I2CSensor
register
- buf
- len
- I2CSensor.sendData(int, byte[], int, int)
public int sendData(int register, byte value)
sendData
in class lejos.nxt.I2CSensor
register
- buf
- len
- I2CSensor.sendData(int, byte)