jAER project on SourceForge

ch.unizh.ini.jaer.hardware.pantilt
Interface PanTiltInterface

All Known Implementing Classes:
CalibratedPanTilt, PanTilt

public interface PanTiltInterface

Interface to a PanTilt controller.

Author:
tobi

Method Summary
 void acquire()
          A method can set this flag to tell other objects that the servo is "owned"
 float getJitterAmplitude()
          Returns the jitter amplitude
 float getJitterFreqHz()
          Returns the jitter frequency in Hz
 float[] getPanTiltValues()
          Returns the last value set, even if the servo interface is not functional.
 ServoInterface getServoInterface()
           
 boolean isLockOwned()
          A method can check this to see if it can use the servo
 void release()
          Releases the "acquired" flag
 void setJitterAmplitude(float jitterAmplitude)
          Sets the amplitude (1/2 of peak to peak) of circular jitter of pan tilt during jittering
 void setJitterFreqHz(float jitterFreqHz)
          The frequency of the jitter
 void setPanTiltValues(float pan, float tilt)
          Simultaneously sets pan and tilt values.
 void setServoInterface(ServoInterface servo)
          Sets the ServoInterface
 void startJitter()
          Starts the servo jittering around its set position at a frequency of 50 Hz with an amplitude of 0.02f
 void stopJitter()
          Stops the jittering
 

Method Detail

acquire

void acquire()
A method can set this flag to tell other objects that the servo is "owned"


getJitterAmplitude

float getJitterAmplitude()
Returns the jitter amplitude


getJitterFreqHz

float getJitterFreqHz()
Returns the jitter frequency in Hz


getPanTiltValues

float[] getPanTiltValues()
Returns the last value set, even if the servo interface is not functional. The servo could still be moving to this location.

Returns:
a float[] array with the 0 component being the pan value, and the 1 component being the tilt

isLockOwned

boolean isLockOwned()
A method can check this to see if it can use the servo


release

void release()
Releases the "acquired" flag


setJitterAmplitude

void setJitterAmplitude(float jitterAmplitude)
Sets the amplitude (1/2 of peak to peak) of circular jitter of pan tilt during jittering

Parameters:
jitterAmplitude - the amplitude

setJitterFreqHz

void setJitterFreqHz(float jitterFreqHz)
The frequency of the jitter

Parameters:
jitterFreqHz - in Hz

setPanTiltValues

void setPanTiltValues(float pan,
                      float tilt)
                      throws HardwareInterfaceException
Simultaneously sets pan and tilt values. The directions here depend on the servo polarities, which could vary. These values apply to HiTec digital servos.

Parameters:
pan - the pan value from 0 to 1 inclusive, 0.5f is the center position. 1 is full right.
tilt - the tilt value from 0 to 1. 1 is full down.
Throws:
HardwareInterfaceException

startJitter

void startJitter()
Starts the servo jittering around its set position at a frequency of 50 Hz with an amplitude of 0.02f

See Also:
setJitterAmplitude(float)

stopJitter

void stopJitter()
Stops the jittering


setServoInterface

void setServoInterface(ServoInterface servo)
Sets the ServoInterface

Parameters:
servo - the interface

getServoInterface

ServoInterface getServoInterface()

jAER project on SourceForge