Package com.diozero.internal.spi
Interface AnalogDeviceInterface
-
- All Superinterfaces:
AutoCloseable
,DeviceInterface
,InternalDeviceInterface
- All Known Subinterfaces:
AnalogInputDeviceInterface
,AnalogOutputDeviceInterface
- All Known Implementing Classes:
PiconZero.PiconZeroAnalogInputDevice
,PiconZero.PiconZeroAnalogOutputDevice
,SysFsAnalogInputDevice
public interface AnalogDeviceInterface extends InternalDeviceInterface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getAdcNumber()
DeviceMode
getMode()
float
getValue()
Read the analog value in the range 0..1 or -1..1 (if the ADC type is signed)-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
Methods inherited from interface com.diozero.internal.spi.InternalDeviceInterface
getKey, isChild, isOpen, setChild
-
-
-
-
Method Detail
-
getMode
DeviceMode getMode()
-
getAdcNumber
int getAdcNumber()
-
getValue
float getValue() throws RuntimeIOException
Read the analog value in the range 0..1 or -1..1 (if the ADC type is signed)- Returns:
- the unscaled value (-1..1)
- Throws:
RuntimeIOException
- if an I/O error occurs
-
-