com.scottpreston.javarobot.chapter3
Class SpeedDiffDrive

java.lang.Object
  extended by com.scottpreston.javarobot.chapter3.BasicDiffDrive
      extended by com.scottpreston.javarobot.chapter3.TimedDiffDrive
          extended by com.scottpreston.javarobot.chapter3.SpeedDiffDrive
All Implemented Interfaces:
JMotion

public class SpeedDiffDrive
extends TimedDiffDrive
implements JMotion


Field Summary
 
Fields inherited from class com.scottpreston.javarobot.chapter3.BasicDiffDrive
LEFT_WHEEL, RIGHT_WHEEL
 
Constructor Summary
SpeedDiffDrive(JSerialPort serialPort)
           
 
Method Summary
 void forward(int ms)
           
 int getSpeed()
           
static void main(java.lang.String[] args)
           
 void pivotLeft(int ms)
           
 void pivotRight(int ms)
           
 void reverse(int ms)
           
 void setSpeed(int speed)
           
 
Methods inherited from class com.scottpreston.javarobot.chapter3.TimedDiffDrive
forward, pivotLeft, pivotRight, reverse
 
Methods inherited from class com.scottpreston.javarobot.chapter3.BasicDiffDrive
forward, getLeftHigh, getLeftLow, getRightHigh, getRightLow, isMotorsInverted, pivotLeft, pivotRight, reverse, setLeftHigh, setLeftLow, setMotors, setMotorsInverted, setRightHigh, setRightLow, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.scottpreston.javarobot.chapter3.JMotion
forward, pivotLeft, pivotRight, reverse, stop
 

Constructor Detail

SpeedDiffDrive

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

getSpeed

public int getSpeed()
Specified by:
getSpeed in interface JMotion

setSpeed

public void setSpeed(int speed)
              throws java.lang.Exception
Specified by:
setSpeed in interface JMotion
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

forward

public void forward(int ms)
             throws java.lang.Exception
Specified by:
forward in interface JMotion
Throws:
java.lang.Exception

reverse

public void reverse(int ms)
             throws java.lang.Exception
Specified by:
reverse in interface JMotion
Throws:
java.lang.Exception

pivotRight

public void pivotRight(int ms)
                throws java.lang.Exception
Specified by:
pivotRight in interface JMotion
Throws:
java.lang.Exception

pivotLeft

public void pivotLeft(int ms)
               throws java.lang.Exception
Specified by:
pivotLeft in interface JMotion
Throws:
java.lang.Exception