public class Motor
extends java.lang.Object
Constructor and Description |
---|
Motor(int id)
Creates a motor instance with given id.
|
public Motor(int id)
id
- 0 for left motor, 1 for right motorpublic void forward()
public void backward()
public void stop()
public void setSpeed(int speed)
speed
- the new speed 0..100