pt.citar.diablu.nxt.brick
Class NXTMotor
java.lang.Object
pt.citar.diablu.nxt.brick.NXTComponent
pt.citar.diablu.nxt.brick.NXTMotor
public class NXTMotor
- extends NXTComponent
- Author:
- Jorge Cardoso
Constructor Summary |
NXTMotor(NXTBrick brick,
byte portAttached)
Creates a new instance of NXTMotor |
NXTMotor
public NXTMotor(NXTBrick brick,
byte portAttached)
- Creates a new instance of NXTMotor
forward
public boolean forward(byte power)
- Make the motor go forward, ramping up the speed.
- Parameters:
power
- The power of the motor.
- Returns:
- True, if no error; False otherwise.
forwardLimit
public boolean forwardLimit(byte power,
int tachoLimit)
slowStop
public boolean slowStop()
- Stops the motor slowly.
- Returns:
- True, if no error; False otherwise.
handBrake
public boolean handBrake()
fastStop
public boolean fastStop()
getTachoLimit
public long getTachoLimit()
getTachoCount
public long getTachoCount()
getBlockTachoCount
public long getBlockTachoCount()
getRotationCount
public long getRotationCount()
resetMotorPosition
public void resetMotorPosition(boolean relative)
Processing library NXTComm by Jorge C. S. Cardoso. (c) 2014