de.jaetzold.art.platform
Interface StepperMotorPeer

All Superinterfaces:
ActuatorPeer, MotorPeer, SensorPeer
All Known Subinterfaces:
ServoPeer

public interface StepperMotorPeer
extends MotorPeer

This is an interface for peers representing a stepper motor.

The position is represented through a separate CountSensor because a StepperMotor does behave also like a simple Motor and therefore getValue() already has a different meaning.

Because a StepperMotor has control over the amount of movement it can also move at a certain speed. The speed is different to power because speed means how far in which time, no matter how hard it is ...


Method Summary
 CountSensor getCountSensor()
          Returns the Sensor descriping the position of this StepperMotor.
 double getSpeed()
          The current speed at which the Motor is moving.
 void setCountSensor(CountSensor sensor)
          Set's the CountSensor to use for counting the steps.
 void setSpeed(double speed)
          Set the speed at which the Motor should move.
 void step(double value)
          Move the stepper motor the given amount of steps.
 
Methods inherited from interface de.jaetzold.art.platform.MotorPeer
getBackward, getPower, isOn, setBackward, setOn, setPower
 
Methods inherited from interface de.jaetzold.art.platform.ActuatorPeer
setValue, setValue
 
Methods inherited from interface de.jaetzold.art.platform.SensorPeer
addPropertyChangeListener, disableEvent, enableEvent, getDeliversFloatingPoint, getPrecision, getValue, isConnected, processEvent, removePropertyChangeListener, update
 

Method Detail

step

public void step(double value)
Move the stepper motor the given amount of steps.

getCountSensor

public CountSensor getCountSensor()
Returns the Sensor descriping the position of this StepperMotor.

setCountSensor

public void setCountSensor(CountSensor sensor)
Set's the CountSensor to use for counting the steps. This may involve a substancial decrease in speed and precision and is therefore not a good idea for now. It is more for a future use.

getSpeed

public double getSpeed()
The current speed at which the Motor is moving.

setSpeed

public void setSpeed(double speed)
Set the speed at which the Motor should move.