|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjosx.vision.RCX
public class RCX
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(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 |
---|
public RCX(java.lang.String port) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void forward()
public void forward(int n)
n
- the number of units to movepublic void backward()
public void backward(int n)
n
- the number of units to movepublic void spinLeft()
public void spinLeft(int n)
n
- the number of units to movepublic void turnLeft()
public void turnLeft(int n)
n
- the number of units to movepublic void scanLeft()
public void scanLeft(int n)
n
- the number of units to movepublic void spinRight()
public void spinRight(int n)
n
- the number of units to movepublic void turnRight()
public void turnRight(int n)
n
- the number of units to movepublic void scanRight()
public void scanRight(int n)
n
- the number of units to movepublic void stop()
public void setPower(byte motors, byte power)
motors
- the selected motorspower
- value 0-7public void controlMotors(byte motors, byte direction, byte n)
motors
- the selected motorsdirection
- the direction to move in 0 - foreards, 1 backwardsn
- the number of units to movepublic void playTone(short frequency, byte duration)
frequency
- the tone frequencyduration
- the duration of the tonepublic void tiltUp(int n)
n
- the number of units to movepublic void tiltDown(int n)
n
- the number of units to move
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |