Class control

java.lang.Object
  |
  +--control

public class control
extends java.lang.Object

This is a class created to control the Lego Mindstorm bot with some sort of precision. The dimensions of the bot with which this class was calibrated to are:
wheel base (from the outside of one wheel to the outside of the other: 168.275 mm.
wheel diameter: 49.6 mm.


Constructor Summary
control()
          Constructor that uses the default starting x and y coordinates (0, 0)
control(int x, int y)
          Constructor where the user defines the bot's starting x and y coordinates
 
Method Summary
 void fwdDist(double dist)
          A method that moves the bot forward a specified distance
 void goTo(double x, double y)
          A method that moves our bot to a specified location, no matter what our current location or orientation is.
 void goToAngle(double theta)
          A method that rotates the bot to a specified angle, no matter what our current orientation is.
 void left(double degree)
          A method that rotates our bot left a specified number of degrees
 void revDist(double dist)
          A method that moves the bot backward a specified distance
 void right(double degree)
          A method that rotates our bot right a specified number of degrees
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

control

public control(int x,
               int y)
Constructor where the user defines the bot's starting x and y coordinates

control

public control()
Constructor that uses the default starting x and y coordinates (0, 0)
Method Detail

fwdDist

public void fwdDist(double dist)
             throws java.lang.InterruptedException
A method that moves the bot forward a specified distance

goToAngle

public void goToAngle(double theta)
               throws java.lang.InterruptedException
A method that rotates the bot to a specified angle, no matter what our current orientation is. It also figures out in which direction it should turn so that it turns the least amount possible

goTo

public void goTo(double x,
                 double y)
          throws java.lang.InterruptedException
A method that moves our bot to a specified location, no matter what our current location or orientation is.

revDist

public void revDist(double dist)
             throws java.lang.InterruptedException
A method that moves the bot backward a specified distance

left

public void left(double degree)
          throws java.lang.InterruptedException
A method that rotates our bot left a specified number of degrees

right

public void right(double degree)
           throws java.lang.InterruptedException
A method that rotates our bot right a specified number of degrees