josx.vision
Class RCX

java.lang.Object
  extended byjosx.vision.RCX
All Implemented Interfaces:
RemoteVisionConstants

public class RCX
extends Object
implements RemoteVisionConstants

Remote execution of commands for vision control.


Field Summary
 
Fields inherited from interface josx.rcxcomm.RemoteVisionConstants
METHOD_JOSX_VISION_RCX_BACKWARD_I, METHOD_JOSX_VISION_RCX_BACKWARD_V, METHOD_JOSX_VISION_RCX_CONTROL_MOTORS, METHOD_JOSX_VISION_RCX_FORWARD_I, METHOD_JOSX_VISION_RCX_FORWARD_V, METHOD_JOSX_VISION_RCX_PLAY_TONE, METHOD_JOSX_VISION_RCX_SCAN_LEFT_I, METHOD_JOSX_VISION_RCX_SCAN_LEFT_V, METHOD_JOSX_VISION_RCX_SCAN_RIGHT_I, METHOD_JOSX_VISION_RCX_SCAN_RIGHT_V, METHOD_JOSX_VISION_RCX_SET_POWER, METHOD_JOSX_VISION_RCX_SPIN_LEFT_I, METHOD_JOSX_VISION_RCX_SPIN_LEFT_V, METHOD_JOSX_VISION_RCX_SPIN_RIGHT_I, METHOD_JOSX_VISION_RCX_SPIN_RIGHT_V, METHOD_JOSX_VISION_RCX_STOP, METHOD_JOSX_VISION_RCX_TILT_DOWN_I, METHOD_JOSX_VISION_RCX_TILT_UP_I, METHOD_JOSX_VISION_RCX_TURN_LEFT_I, METHOD_JOSX_VISION_RCX_TURN_LEFT_V, METHOD_JOSX_VISION_RCX_TURN_RIGHT_I, METHOD_JOSX_VISION_RCX_TURN_RIGHT_V
 
Constructor Summary
RCX()
           
 
Method Summary
static void backward()
          Move the robot backwards until stop or another command is executed.
static void backward(int n)
          Move the robot backwards n units.
static void controlMotors(byte motors, byte direction, byte n)
          Move the selected motors in the selected direction for n units
static void forward()
          Move the robot forwards until stop or another command is executed.
static void forward(int n)
          Move the robot forwards n units.
static void playTone(short frequency, byte duration)
          Play a tone
static void scanLeft()
          Scan left until stop or another command is executed.
static void scanLeft(int n)
          Scan left n units.
static void scanRight()
          Scan right until stop or another command is executed.
static void scanRight(int n)
          Scan right n units.
static void setPower(byte motors, byte power)
          Set the power of selected motors
static void spinLeft()
          Spin left until stop or another command is executed.
static void spinLeft(int n)
          Spin left n units.
static void spinRight()
          Spin right until stop or another command is executed.
static void spinRight(int n)
          Spin right n units.
static void stop()
          Stop all motors
static void tiltDown(int n)
          Tilt the camera down n units
static void tiltUp(int n)
          Tilt the camera up n units
static void turnLeft()
          Turn left until stop or another command is executed.
static void turnLeft(int n)
          Turn left n units.
static void turnRight()
          Turn right until stop or another command is executed.
static void turnRight(int n)
          Turn right n units.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

RCX

public RCX()
Method Detail

forward

public static void forward()
Move the robot forwards until stop or another command is executed.


forward

public static void forward(int n)
Move the robot forwards n units.

Parameters:
n - the number of units to move

backward

public static void backward()
Move the robot backwards until stop or another command is executed.


backward

public static void backward(int n)
Move the robot backwards n units.

Parameters:
n - the number of units to move

spinLeft

public static void spinLeft()
Spin left until stop or another command is executed.


spinLeft

public static void spinLeft(int n)
Spin left n units.

Parameters:
n - the number of units to move

turnLeft

public static void turnLeft()
Turn left until stop or another command is executed.


turnLeft

public static void turnLeft(int n)
Turn left n units.

Parameters:
n - the number of units to move

scanLeft

public static void scanLeft()
Scan left until stop or another command is executed.


scanLeft

public static void scanLeft(int n)
Scan left n units.

Parameters:
n - the number of units to move

spinRight

public static void spinRight()
Spin right until stop or another command is executed.


spinRight

public static void spinRight(int n)
Spin right n units.

Parameters:
n - the number of units to move

turnRight

public static void turnRight()
Turn right until stop or another command is executed.


turnRight

public static void turnRight(int n)
Turn right n units.

Parameters:
n - the number of units to move

scanRight

public static void scanRight()
Scan right until stop or another command is executed.


scanRight

public static void scanRight(int n)
Scan right n units.

Parameters:
n - the number of units to move

stop

public static void stop()
Stop all motors


setPower

public static void setPower(byte motors,
                            byte power)
Set the power of selected motors

Parameters:
motors - the selected motors

controlMotors

public static void controlMotors(byte motors,
                                 byte direction,
                                 byte n)
Move the selected motors in the selected direction for n units

Parameters:
motors - the selected motors
direction - the direction to move in 0 - foreards, 1 backwards
n - the number of units to move

playTone

public static void playTone(short frequency,
                            byte duration)
Play a tone

Parameters:
frequency - the tone frequency
duration - the duration of the tone

tiltUp

public static void tiltUp(int n)
Tilt the camera up n units

Parameters:
n - the number of units to move

tiltDown

public static void tiltDown(int n)
Tilt the camera down n units

Parameters:
n - the number of units to move