|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlejos.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. |
| 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)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, 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)
power - power from 0-100mode - 1=forward, 2=backward, 3=stop, 4=floatpublic int getTachoCount()
public static int getTachoCountById(int aMotor)
public void resetTachoCount()
public static void resetTachoCountById(int aMotor)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||