com.scottpreston.javarobot.chapter3
Class BasicDiffDrive
java.lang.Object
com.scottpreston.javarobot.chapter3.BasicDiffDrive
- Direct Known Subclasses:
- TimedDiffDrive
public class BasicDiffDrive
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LEFT_WHEEL
public static final int LEFT_WHEEL
- See Also:
- Constant Field Values
RIGHT_WHEEL
public static final int RIGHT_WHEEL
- See Also:
- Constant Field Values
BasicDiffDrive
public BasicDiffDrive(JSerialPort serialPort)
throws java.lang.Exception
- Throws:
java.lang.Exception
setMotors
public void setMotors(int left,
int right)
reverse
public void reverse()
throws java.lang.Exception
- Throws:
java.lang.Exception
forward
public void forward()
throws java.lang.Exception
- Throws:
java.lang.Exception
pivotRight
public void pivotRight()
throws java.lang.Exception
- Throws:
java.lang.Exception
pivotLeft
public void pivotLeft()
throws java.lang.Exception
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Throws:
java.lang.Exception
isMotorsInverted
public boolean isMotorsInverted()
setMotorsInverted
public void setMotorsInverted(boolean motorsInverted)
getLeftHigh
public int getLeftHigh()
setLeftHigh
public void setLeftHigh(int leftHigh)
getLeftLow
public int getLeftLow()
setLeftLow
public void setLeftLow(int leftLow)
getRightHigh
public int getRightHigh()
setRightHigh
public void setRightHigh(int rightHigh)
getRightLow
public int getRightLow()
setRightLow
public void setRightLow(int rightLow)
main
public static void main(java.lang.String[] args)