|
|||||||||
| 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
|
| Fields inherited from interface lejos.nxt.SensorConstants |
|---|
MODE_ANGLESTEP, MODE_BOOLEAN, MODE_CELSIUS, MODE_FARENHEIT, MODE_PCTFULLSCALE, MODE_PERIODCOUNTER, MODE_RAW, MODE_TRANSITIONCNT, TYPE_ANGLE, TYPE_CUSTOM, 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 |
| Constructor Summary | |
|---|---|
PFMate(I2CPort port,
int channel)
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, getData, getPort, getProductID, getSensorType, getVersion, 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
| Constructor Detail |
|---|
public PFMate(I2CPort port,
int channel)
port - sensor portchannel - PF Channel 1-4| 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 | ||||||||