|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread lejos.nxt.addon.RCXRotationSensor
public class RCXRotationSensor
Provide access to the Lego RCX Rotation Sensor. The sensor records the direction and degree of rotation. A full rotation will result in a count of +/-16. Thus each count is 22.5 degrees.
Field Summary | |
---|---|
static int |
ONE_ROTATION
The incremental count for one whole rotation (360 degrees). |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
RCXRotationSensor(LegacySensorPort port)
Create an RCX rotation sensor object attached to the specified port. |
Method Summary | |
---|---|
int |
getRawTachoCount()
Returns the raw values from the rotation sensor instead of degrees. |
int |
getRotationSpeed()
Returns the actual speed. |
int |
getTachoCount()
Returns the tachometer count. |
void |
resetTachoCount()
Reset the tacho count to zero. |
Methods inherited from class java.lang.Thread |
---|
currentThread, getId, getName, getPriority, init_thread, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, run, set_priority, setDaemon, setName, setPriority, sleep, start, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ONE_ROTATION
Constructor Detail |
---|
public RCXRotationSensor(LegacySensorPort port)
port
- port, e.g. Port.S1Method Detail |
---|
public int getTachoCount()
getTachoCount
in interface Encoder
public int getRawTachoCount()
public void resetTachoCount()
resetTachoCount
in interface Encoder
public int getRotationSpeed()
Tachometer
getRotationSpeed
in interface Tachometer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |