|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.I2CSensor lejos.nxt.addon.PFLink
public class PFLink
Class for controlling PF Motors with MindSensors NRLink-Nx
Fields inherited from class lejos.nxt.I2CSensor |
---|
PRODUCT_ID, SENSOR_TYPE, VERSION |
Constructor Summary | |
---|---|
PFLink(I2CPort _Port)
|
Method Summary | |
---|---|
void |
initialize(byte _Range)
Should be called once to set up the NRLink for usage in the program |
void |
installDefaultMacros()
Installs the macro definitions used by this class. |
void |
installMacro(int _Address,
byte[] _Macro)
Installs a macro into the NRLink You really should call this only once for a new NRLink since it stores them in EEPROM even if turned of. |
int |
runCommand(int command)
Executes a command |
void |
runMacro(int _Address)
Runs a macro which has been previously installed on the NRLink. |
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 static final byte NR_RANGE_SHORT
public static final byte NR_RANGE_LONG
public static final int MOTOR_CH1_A_FLOAT
public static final int MOTOR_CH1_A_FORWARD
public static final int MOTOR_CH1_A_REVERSE
public static final int MOTOR_CH1_A_BRAKE
public static final int MOTOR_CH1_B_FLOAT
public static final int MOTOR_CH1_B_FORWARD
public static final int MOTOR_CH1_B_REVERSE
public static final int MOTOR_CH1_B_BRAKE
public static final int MOTOR_CH2_A_FLOAT
public static final int MOTOR_CH2_A_FORWARD
public static final int MOTOR_CH2_A_REVERSE
public static final int MOTOR_CH2_A_BRAKE
public static final int MOTOR_CH2_B_FLOAT
public static final int MOTOR_CH2_B_FORWARD
public static final int MOTOR_CH2_B_REVERSE
public static final int MOTOR_CH2_B_BRAKE
public static final int MOTOR_CH3_A_FLOAT
public static final int MOTOR_CH3_A_FORWARD
public static final int MOTOR_CH3_A_REVERSE
public static final int MOTOR_CH3_A_BRAKE
public static final int MOTOR_CH3_B_FLOAT
public static final int MOTOR_CH3_B_FORWARD
public static final int MOTOR_CH3_B_REVERSE
public static final int MOTOR_CH3_B_BRAKE
public static final int MOTOR_CH4_A_FLOAT
public static final int MOTOR_CH4_A_FORWARD
public static final int MOTOR_CH4_A_REVERSE
public static final int MOTOR_CH4_A_BRAKE
public static final int MOTOR_CH4_B_FLOAT
public static final int MOTOR_CH4_B_FORWARD
public static final int MOTOR_CH4_B_REVERSE
public static final int MOTOR_CH4_B_BRAKE
public static final int COMBO_CH1_A_FORWARD_B_FORWARD
public static final int COMBO_CH1_A_FORWARD_B_REVERSE
public static final int COMBO_CH1_A_REVERSE_B_FORWARD
public static final int COMBO_CH1_A_REVERSE_B_REVERSE
public static final int COMBO_CH2_A_FORWARD_B_FORWARD
public static final int COMBO_CH2_A_FORWARD_B_REVERSE
public static final int COMBO_CH2_A_REVERSE_B_FORWARD
public static final int COMBO_CH2_A_REVERSE_B_REVERSE
public static final int COMBO_CH3_A_FORWARD_B_FORWARD
public static final int COMBO_CH3_A_FORWARD_B_REVERSE
public static final int COMBO_CH3_A_REVERSE_B_FORWARD
public static final int COMBO_CH3_A_REVERSE_B_REVERSE
public static final int COMBO_CH4_A_FORWARD_B_FORWARD
public static final int COMBO_CH4_A_FORWARD_B_REVERSE
public static final int COMBO_CH4_A_REVERSE_B_FORWARD
public static final int COMBO_CH4_A_REVERSE_B_REVERSE
Constructor Detail |
---|
public PFLink(I2CPort _Port)
Method Detail |
---|
public void initialize(byte _Range)
_Range
- Either NR_RANGE_SHORT or NR_RANGE_LONG, which uses more powerpublic int runCommand(int command)
command
-
public void installMacro(int _Address, byte[] _Macro)
_Address
- The address up from 0x40 for the macro_Macro
- The macropublic void installDefaultMacros()
public void runMacro(int _Address)
_Address
- The address of the macro, one of the MOTOR_* for a single motor
or one of the COMBO_* macros which work on both motors simultaneously
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |