|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dexterind.gopigo.components.Motor
public class Motor
Handles the motor functions.
| Field Summary | |
|---|---|
static int |
BACKWARD
The backward command. |
private static Board |
board
The main object which handles the methods to get access to the resources connected to the board. |
private int |
command
The current command. |
private Debug |
debug
The debug object. |
static int |
FORWARD
The forward command. |
static int |
LEFT
The left motor ID. |
private static int |
LEFT_COMMAND
The left motor command. |
static int |
RIGHT
The right motor ID. |
private static int |
RIGHT_COMMAND
The right motor command. |
| Constructor Summary | |
|---|---|
Motor(int id)
|
|
| Method Summary | |
|---|---|
int |
move(int direction,
int speed)
Moves the motor in the direction at the given speed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int LEFT_COMMAND
private static final int RIGHT_COMMAND
public static final int FORWARD
public static final int BACKWARD
public static final int LEFT
public static final int RIGHT
private static Board board
private int command
private Debug debug
| Constructor Detail |
|---|
public Motor(int id)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException| Method Detail |
|---|
public int move(int direction,
int speed)
throws java.io.IOException
direction - The direction of the movement.speed -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||