com.scottpreston.javarobot.chapter3
Class BasicDiffDrive

java.lang.Object
  extended by com.scottpreston.javarobot.chapter3.BasicDiffDrive
Direct Known Subclasses:
TimedDiffDrive

public class BasicDiffDrive
extends java.lang.Object


Field Summary
static int LEFT_WHEEL
           
static int RIGHT_WHEEL
           
 
Constructor Summary
BasicDiffDrive(JSerialPort serialPort)
           
 
Method Summary
 void forward()
           
 int getLeftHigh()
           
 int getLeftLow()
           
 int getRightHigh()
           
 int getRightLow()
           
 boolean isMotorsInverted()
           
static void main(java.lang.String[] args)
           
 void pivotLeft()
           
 void pivotRight()
           
 void reverse()
           
 void setLeftHigh(int leftHigh)
           
 void setLeftLow(int leftLow)
           
 void setMotors(int left, int right)
           
 void setMotorsInverted(boolean motorsInverted)
           
 void setRightHigh(int rightHigh)
           
 void setRightLow(int rightLow)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

BasicDiffDrive

public BasicDiffDrive(JSerialPort serialPort)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

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)