|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.nxt.I2CSensor
lejos.nxt.addon.PFMate
public class PFMate
Supports Mindsensors PF Mate
This device is used to control Lego Power Function IR receiver
| Field Summary | |
|---|---|
PFMateMotor |
A
|
PFMateMotor |
B
|
static int |
DEFAULT_PFMATE_ADDRESS
|
| Fields inherited from class lejos.nxt.I2CSensor |
|---|
address, DEFAULT_I2C_ADDRESS, port, REG_PRODUCT_ID, REG_VENDOR_ID, REG_VERSION |
| Fields inherited from interface lejos.nxt.SensorConstants |
|---|
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 |
| Constructor Summary | |
|---|---|
PFMate(I2CPort port,
int channel)
Constructor takes in the sensor port and the PF channel you will be using |
|
PFMate(I2CPort port,
int channel,
int address)
Constructor takes in the sensor port and the PF channel you will be using |
|
| Method Summary | |
|---|---|
int |
getChannel()
Returns the current IR channel in use by the PF Mate |
int |
getMotor()
Returns which motors are activated |
void |
setChannel(int channel)
Sets PF channel to use. |
void |
setMotor(int motor)
Determines which motors are to be used buy default both are activated |
void |
update()
Sends command to PF IR receiver to apply changes made to the registers. |
| Methods inherited from class lejos.nxt.I2CSensor |
|---|
fetchString, getAddress, getData, getData, getPort, getProductID, getVendorID, getVersion, sendData, sendData, sendData, setAddress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public PFMateMotor A
public PFMateMotor B
public static final int DEFAULT_PFMATE_ADDRESS
| Constructor Detail |
|---|
public PFMate(I2CPort port,
int channel)
port - sensor portchannel - PF Channel 1-4
public PFMate(I2CPort port,
int channel,
int address)
port - sensor portchannel - PF Channel 1-4address - I2C address of the controller| Method Detail |
|---|
public void update()
public void setChannel(int channel)
channel - 1-4public void setMotor(int motor)
motor - 0 both, 1 motor A or 2 motor Bpublic int getChannel()
public int getMotor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||