Package com.diozero.devices
Class PiconZero.PiconZeroAnalogInputDevice
java.lang.Object
com.diozero.internal.provider.AbstractDevice
com.diozero.internal.provider.AbstractInputDevice<AnalogInputEvent>
com.diozero.devices.PiconZero.PiconZeroAnalogInputDevice
- All Implemented Interfaces:
AnalogInputDeviceInterface
,DeviceInterface
,java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- PiconZero
public static class PiconZero.PiconZeroAnalogInputDevice extends AbstractInputDevice<AnalogInputEvent> implements AnalogInputDeviceInterface
-
Constructor Summary
Constructors Constructor Description PiconZeroAnalogInputDevice(PiconZero piconZero, java.lang.String key, PinInfo pinInfo)
-
Method Summary
Modifier and Type Method Description protected void
closeDevice()
int
getAdcNumber()
int
getChannel()
float
getValue()
Methods inherited from class com.diozero.internal.provider.AbstractInputDevice
disableListener, enableListener, generatesEvents, removeListener, setListener, valueChanged
Methods inherited from class com.diozero.internal.provider.AbstractDevice
close, getDeviceFactory, getKey, isOpen
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.diozero.internal.provider.AnalogInputDeviceInterface
close, generatesEvents, getMode, removeListener, setListener
-
Constructor Details
-
Method Details
-
closeDevice
protected void closeDevice()- Specified by:
closeDevice
in classAbstractDevice
-
getValue
- Specified by:
getValue
in interfaceAnalogInputDeviceInterface
- Throws:
RuntimeIOException
-
getAdcNumber
public int getAdcNumber()- Specified by:
getAdcNumber
in interfaceAnalogInputDeviceInterface
-
getChannel
public int getChannel()
-