nl.tue.id.creapro.admoveo
Class AnalogActuator

java.lang.Object
  extended by nl.tue.id.creapro.admoveo.Actuator
      extended by nl.tue.id.creapro.admoveo.AnalogActuator
All Implemented Interfaces:
ActuatorControl, AnalogActuatorControl

public class AnalogActuator
extends Actuator
implements AnalogActuatorControl

This class models all analog actuators.

Author:
jhu

Constructor Summary
AnalogActuator(Arduino arduino, int pin)
          Creates an instance of the analog actuator that is connected to a particular pin on the Arduino board.
 
Method Summary
 int getPower()
           
 void off()
          Switches the actuator off.
 void on()
          Switches the actuator on.
 void setPower(int power)
          Sets the power level of the actuator.
 
Methods inherited from class nl.tue.id.creapro.admoveo.Actuator
getActuators, getPin, isOn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.tue.id.creapro.admoveo.ActuatorControl
isOn
 

Constructor Detail

AnalogActuator

public AnalogActuator(Arduino arduino,
                      int pin)
Creates an instance of the analog actuator that is connected to a particular pin on the Arduino board.

Parameters:
arduino - the Arduino board.
pin - the pin to which this actuator is connected.
Method Detail

getPower

public int getPower()

off

public void off()
Description copied from interface: ActuatorControl
Switches the actuator off.

Specified by:
off in interface ActuatorControl
Overrides:
off in class Actuator

on

public void on()
Description copied from interface: ActuatorControl
Switches the actuator on.

Specified by:
on in interface ActuatorControl
Overrides:
on in class Actuator

setPower

public void setPower(int power)
Description copied from interface: AnalogActuatorControl
Sets the power level of the actuator.

Specified by:
setPower in interface AnalogActuatorControl
Parameters:
power - the power level, between 0 and 255.