|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lejos.nxt.MotorPort
public class MotorPort
Abstraction for a NXT output port.
Field Summary | |
---|---|
static MotorPort |
A
MotorPort A. |
static MotorPort |
B
MotorPort B. |
static MotorPort |
C
MotorPort C. |
Fields inherited from interface lejos.nxt.BasicMotorPort |
---|
PWM_BRAKE, PWM_FLOAT |
Method Summary | |
---|---|
void |
controlMotor(int power,
int mode)
Low-level method to control a motor. |
int |
getTachoCount()
returns tachometer count |
static int |
getTachoCountById(int aMotor)
|
void |
resetTachoCount()
resets the tachometer count to 0; |
static void |
resetTachoCountById(int aMotor)
|
void |
setPWMMode(int mode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final MotorPort A
public static final MotorPort B
public static final MotorPort C
Method Detail |
---|
public void controlMotor(int power, int mode)
controlMotor
in interface BasicMotorPort
power
- power from 0-100mode
- 1=forward, 2=backward, 3=stop, 4=floatpublic int getTachoCount()
getTachoCount
in interface Encoder
public static int getTachoCountById(int aMotor)
public void resetTachoCount()
resetTachoCount
in interface Encoder
public void setPWMMode(int mode)
setPWMMode
in interface BasicMotorPort
public static void resetTachoCountById(int aMotor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |