public interface AdcGpioProvider extends GpioProvider
This interface defines the required interfaces for an ADC GPIO provider. (analog to digital converter chip)
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MONITOR_INTERVAL |
static int |
DEFAULT_THRESHOLD |
static int |
INVALID_VALUE |
static int |
MIN_MONITOR_INTERVAL |
Modifier and Type | Method and Description |
---|---|
double |
getEventThreshold(GpioPinAnalogInput pin)
Get the event threshold value for a given analog input pin.
|
double |
getEventThreshold(Pin pin)
Get the event threshold value for a given analog input pin.
|
double |
getImmediateValue(GpioPinAnalogInput pin)
This method will perform an immediate data acquisition directly to the ADC chip to get the
requested pin's input conversion value.
|
double |
getImmediateValue(Pin pin)
This method will perform an immediate data acquisition directly to the ADC chip to get the
requested pin's input conversion value.
|
double |
getMaxSupportedValue()
Get the maximum supported analog value for the ADC implementation.
|
double |
getMinSupportedValue()
Get the minimum supported analog value for the ADC implementation.
|
boolean |
getMonitorEnabled()
Get the background monitoring thread's enabled state.
|
int |
getMonitorInterval()
Get the background monitoring thread's rate of data acquisition.
|
float |
getPercentValue(GpioPinAnalogInput pin)
Get the current value in a percentage of the available range instead of a raw value.
|
float |
getPercentValue(Pin pin)
Get the current value in a percentage of the available range instead of a raw value.
|
void |
setEventThreshold(double threshold,
GpioPinAnalogInput... pin)
Set the event threshold value for a given analog input pin.
|
void |
setEventThreshold(double threshold,
Pin... pin)
Set the event threshold value for a given analog input pin.
|
void |
setMonitorEnabled(boolean enabled)
Set the background monitoring thread's enabled state.
|
void |
setMonitorInterval(int monitorInterval)
Change the background monitoring thread's rate of data acquisition.
|
addListener, export, export, getMode, getName, getPullResistance, getPwm, getState, getValue, hasPin, isExported, isShutdown, removeAllListeners, removeListener, setMode, setPullResistance, setPwm, setPwmRange, setState, setValue, shutdown, unexport
static final int MIN_MONITOR_INTERVAL
static final int DEFAULT_MONITOR_INTERVAL
static final int DEFAULT_THRESHOLD
static final int INVALID_VALUE
double getEventThreshold(Pin pin)
pin
- analog input pindouble getEventThreshold(GpioPinAnalogInput pin)
pin
- analog input pinvoid setEventThreshold(double threshold, Pin... pin)
threshold
- value between 0 and 1023.pin
- analog input pin (vararg, one or more inputs can be defined.)void setEventThreshold(double threshold, GpioPinAnalogInput... pin)
threshold
- value between 0 and 1023.pin
- analog input pin (vararg, one or more inputs can be defined.)int getMonitorInterval()
void setMonitorInterval(int monitorInterval)
monitorInterval
- boolean getMonitorEnabled()
void setMonitorEnabled(boolean enabled)
enabled
- monitoring enabled or disabled statedouble getImmediateValue(Pin pin) throws IOException
pin
- requested input pin to acquire conversion valueIOException
double getImmediateValue(GpioPinAnalogInput pin) throws IOException
pin
- requested input pin to acquire conversion valueIOException
double getMinSupportedValue()
double getMaxSupportedValue()
float getPercentValue(Pin pin)
float getPercentValue(GpioPinAnalogInput pin)
Copyright © 2012–2016 Pi4J. All rights reserved.