|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.nxt.addon.NXTMMXMotor
public class NXTMMXMotor
Supports Mindsensors NXTMMX. this device allows you to connect two additional motors to your robot. Multiple NXTMMXs can be chained together.
Constructor Summary | |
---|---|
NXTMMXMotor(NXTMMX mux,
int motor)
Constructor, you don't have to worry about this its called two times by the constructor in the NXTMMX class to create each motor instance. |
Method Summary | |
---|---|
void |
backward()
Causes motor to rotate backwards. |
void |
flt()
Causes motor to float. |
void |
forward()
Causes motor to rotate forward. |
int |
getLimitAngle()
Return the angle that a Motor is rotating to. |
int |
getMode()
Returns the mode |
int |
getRotationSpeed()
same as get speed I need to work on this still |
int |
getSpeed()
return the set speed of the motor. |
int |
getTachoCount()
Returns the tachometer count. |
boolean |
isMoving()
Returns true if the motor is in motion. |
boolean |
isOverloaded()
Determines if the motor stalled due to over load. |
boolean |
isRamping()
Determines if the motor is ramping up or down. |
boolean |
isRegulating()
Determine whether speed control is on or not |
boolean |
isSmoothAcceleration()
Determines if speed ramping is enabled |
boolean |
isStalled()
Determines if the motor is stalled or not |
boolean |
isTaskRunning()
Determines if the motor is running a task. |
void |
lock()
Locks the motor in current position. |
void |
regulateSpeed(boolean controlSpeed)
turns speed regulation on and off for tacho and time methods. |
void |
resetTachoCount()
Resets the tachometer count to zero. |
void |
rotate(int deg)
Causes motor to rotate by a specified angle. |
void |
rotate(int deg,
boolean immediateReturn)
same as rotate but returns immediately |
void |
rotateTime(int time,
boolean direction)
Rotates the motor for specified amount of time |
void |
rotateTime(int time,
boolean direction,
boolean immediateReturn)
runs motor for specified amount of time and immediately returns |
void |
rotateTo(int deg)
rotates to the tacho position indicated. |
void |
rotateTo(int deg,
boolean immediateReturn)
rotates to the tacho position that you want and immediately returns. |
void |
setSpeed(int speed)
sets motor speed. |
void |
setTachoBreak(boolean tachoBreak)
when this bit is set after tacho methods the motor will break. |
void |
setTachoLock(boolean tachoLock)
when using this bit after tacho methods force feed back will be used to hold the motor in place. |
void |
smoothAcceleration(boolean rampUp)
enables and disables speed ramping |
void |
stop()
stops the motor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NXTMMXMotor(NXTMMX mux, int motor)
mux
- the motor multiplexormotor
- the index of the motorMethod Detail |
---|
public void backward()
public void flt()
public void forward()
public int getLimitAngle()
public int getMode()
public boolean isRegulating()
public boolean isMoving()
public boolean isStalled()
public boolean isOverloaded()
public boolean isTaskRunning()
public void stop()
public int getTachoCount()
public void resetTachoCount()
public int getRotationSpeed()
public int getSpeed()
public void regulateSpeed(boolean controlSpeed)
public void rotate(int deg)
deg
- - by which the motor will rotate.public void rotate(int deg, boolean immediateReturn)
deg
- - number of deg to rotate.immediateReturn
- - does not matter if true or false it will return after mux is programmed.public void rotateTo(int deg)
deg
- - the tacho position that you want.public void rotateTo(int deg, boolean immediateReturn)
public void rotateTime(int time, boolean direction)
time
- 1 - 255 secdirection
- true is forward false is backward.public void rotateTime(int time, boolean direction, boolean immediateReturn)
time
- = 1 - 255 secdirection
- true is forward false is backward.immediateReturn
- - does not matter if true or falsepublic void setSpeed(int speed)
speed
- 0 - 100public void smoothAcceleration(boolean rampUp)
rampUp
- true turns it on false turns it offpublic boolean isSmoothAcceleration()
public boolean isRamping()
public void setTachoLock(boolean tachoLock)
tachoLock
- true turns it onpublic void setTachoBreak(boolean tachoBreak)
tachoBreak
- turns it on.public void lock()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |