orc
Class AnalogInput

java.lang.Object
  extended by orc.AnalogInput

public class AnalogInput
extends java.lang.Object

Represents one of the 14bit external ADC ports.


Constructor Summary
AnalogInput(Orc orc, int port)
           
 
Method Summary
 double getVoltage()
           
 double getVoltageUnfiltered()
           
 void setLPF(double alpha)
          Set the alpha coefficient for the low-pass filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalogInput

public AnalogInput(Orc orc,
                   int port)
Method Detail

getVoltage

public double getVoltage()

getVoltageUnfiltered

public double getVoltageUnfiltered()

setLPF

public void setLPF(double alpha)
Set the alpha coefficient for the low-pass filter. y[n] = alpha*y[n-1] + (1-alpha)*x[n]. I.e., values near one represent low-pass filters with greater effect. The nominal sample rate is 500Hz.

Parameters:
alpha - [0,1].