lejos.robotics
Interface DCMotor

All Known Subinterfaces:
TachoMotor
All Known Implementing Classes:
BasicMotor, Motor, PFMateMotor, RCXMotor, RemoteMotor

public interface DCMotor

Interface for a regular DC motor with no encoder. TODO: Reconcile this with lejos.nxt.BasicMotor. Maybe BasicMotor implements this?

Author:
BB

Method Summary
 void backward()
          Causes motor to rotate backwards until stop is called.
 void flt()
          Motor loses all power, causing the rotor to float freely to a stop.
 void forward()
          Causes motor to rotate forward until stop is called.
 boolean isMoving()
          Return if the motor is moving.
 void stop()
          Causes motor to stop immediately.
 

Method Detail

forward

void forward()
Causes motor to rotate forward until stop is called.


backward

void backward()
Causes motor to rotate backwards until stop is called.


stop

void stop()
Causes motor to stop immediately. It will resist any further motion. Cancels any rotate() orders in progress.


flt

void flt()
Motor loses all power, causing the rotor to float freely to a stop. This is not the same as stopping, which locks the rotor.


isMoving

boolean isMoving()
Return if the motor is moving.

Returns:
true if the motor is currently in motion