Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## josx.vision
Class RCX

    java.lang.Object
      josx.vision.RCX

All Implemented Interfaces:
  josx.rcxcomm.RemoteVisionConstants

    public class RCX

extends java.lang.Object
implements josx.rcxcomm.RemoteVisionConstants

Remote execution of commands for vision control.

Author:
  Lawrie Griffiths

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(java.lang.String port)`

Method Summary
`void` | `backward()` Move the robot backwards until stop or another command is executed.
`void` | `backward(int n)` Move the robot backwards n units.
`void` | `controlMotors(byte motors, byte direction, byte n)` Move the selected motors in the selected direction for n units
`void` | `forward()` Move the robot forwards until stop or another command is executed.
`void` | `forward(int n)` Move the robot forwards n units.
`void` | `playTone(short frequency, byte duration)` Play a tone
`void` | `scanLeft()` Scan left until stop or another command is executed.
`void` | `scanLeft(int n)` Scan left n units.
`void` | `scanRight()` Scan right until stop or another command is executed.
`void` | `scanRight(int n)` Scan right n units.
`void` | `setPower(byte motors, byte power)` Set the power of selected motors
`void` | `spinLeft()` Spin left until stop or another command is executed.
`void` | `spinLeft(int n)` Spin left n units.
`void` | `spinRight()` Spin right until stop or another command is executed.
`void` | `spinRight(int n)` Spin right n units.
`void` | `stop()` Stop all motors
`void` | `tiltDown(int n)` Tilt the camera down n units
`void` | `tiltUp(int n)` Tilt the camera up n units
`void` | `turnLeft()` Turn left until stop or another command is executed.
`void` | `turnLeft(int n)` Turn left n units.
`void` | `turnRight()` Turn right until stop or another command is executed.
`void` | `turnRight(int n)` Turn right n units.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RCX

    public RCX(java.lang.String port)
        throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### forward

    public void forward()

  Move the robot forwards until stop or another command is executed.

### forward

    public void forward(int n)

  Move the robot forwards n units.

  Parameters:
    `n` - the number of units to move

### backward

    public void backward()

  Move the robot backwards until stop or another command is executed.

### backward

    public void backward(int n)

  Move the robot backwards n units.

  Parameters:
    `n` - the number of units to move

### spinLeft

    public void spinLeft()

  Spin left until stop or another command is executed.

### spinLeft

    public void spinLeft(int n)

  Spin left n units.

  Parameters:
    `n` - the number of units to move

### turnLeft

    public void turnLeft()

  Turn left until stop or another command is executed.

### turnLeft

    public void turnLeft(int n)

  Turn left n units.

  Parameters:
    `n` - the number of units to move

### scanLeft

    public void scanLeft()

  Scan left until stop or another command is executed.

### scanLeft

    public void scanLeft(int n)

  Scan left n units.

  Parameters:
    `n` - the number of units to move

### spinRight

    public void spinRight()

  Spin right until stop or another command is executed.

### spinRight

    public void spinRight(int n)

  Spin right n units.

  Parameters:
    `n` - the number of units to move

### turnRight

    public void turnRight()

  Turn right until stop or another command is executed.

### turnRight

    public void turnRight(int n)

  Turn right n units.

  Parameters:
    `n` - the number of units to move

### scanRight

    public void scanRight()

  Scan right until stop or another command is executed.

### scanRight

    public void scanRight(int n)

  Scan right n units.

  Parameters:
    `n` - the number of units to move

### stop

    public void stop()

  Stop all motors

### setPower

    public void setPower(byte motors,
                         byte power)

  Set the power of selected motors

  Parameters:
    `motors` - the selected motors
    `power` - value 0-7

### controlMotors

    public 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 void playTone(short frequency,
                         byte duration)

  Play a tone

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

### tiltUp

    public void tiltUp(int n)

  Tilt the camera up n units

  Parameters:
    `n` - the number of units to move

### tiltDown

    public void tiltDown(int n)

  Tilt the camera down n units

  Parameters:
    `n` - the number of units to move

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD