|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface class for both real and simulated robots. Defines all the input and output methods a controller can call.
Method Summary | |
void |
backward()
Sets the robot moving backwards, this will continue until some other method is called to stop it. |
void |
backward(int time)
Makes the robot move backwards for the given amount of time |
void |
beep()
Makes the robot beep |
void |
forward()
Sets the robot moving forwards, this will continue until some other method is called to stop it. |
void |
forward(int time)
Makes the robot move forwards for the given amount of time |
int |
getSensor1()
Get the current reading of this sensor |
int |
getSensor2()
Get the current reading of this sensor |
int |
getSensor3()
Get the current reading of this sensor |
void |
left()
Sets the robot spinning left, this will continue until some other method is called to stop it. |
void |
left(int time)
Spins the robot left for the given amount of time |
void |
right()
Sets the robot spinning right, this will continue until some other method is called to stop it. |
void |
right(int time)
Spins the robot right for the given amount of time |
void |
stopMoving()
Stops all motors immediately |
Method Detail |
public void forward()
public void forward(int time)
time
- the time in millisecondspublic void backward()
public void backward(int time)
time
- the time in millisecondspublic void right()
public void right(int time)
time
- the time in millisecondspublic void left()
public void left(int time)
time
- the time in millisecondspublic void stopMoving()
public void beep()
public int getSensor1()
public int getSensor2()
public int getSensor3()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |