Package crackers.kobots.devices.expander
Class ADS7830
-
- All Implemented Interfaces:
-
com.diozero.internal.spi.AnalogInputDeviceFactoryInterface,com.diozero.internal.spi.DeviceFactoryInterface,java.lang.AutoCloseable
public final class ADS7830 extends AbstractDeviceFactory implements AnalogInputDeviceFactoryInterfaceThe ADS7830 is a single-supply, low-power, 8-bit data acquisition device that features a serial I2C interface and an 8-channel multiplexer..
-
-
Constructor Summary
Constructors Constructor Description ADS7830(I2CDeviceInterface i2CDevice)
-
Method Summary
Modifier and Type Method Description final I2CDeviceInterfacegetI2CDevice()StringgetName()<Error class: unknown class>getBoardPinInfo()AnalogInputDeviceInterfacecreateAnalogInputDevice(String key, PinInfo pinInfo)final ShortreadFromChannel(Integer channel)Read raw data from the channel (0-7). final FloatgetValue(Integer channel)Returns a scaled value (0.0 to 1.0) for the given channel. final Floatget(Integer channel)Returns a scaled value (0.0 to 1.0) for the given channel. -
Methods inherited from class com.diozero.internal.spi.AbstractDeviceFactory
close, createI2CKey, createPinKey, createPwmPinKey, createSerialKey, createServoPinKey, createSpiKey, deviceClosed, deviceOpened, getDevice, isClosed, isDeviceOpened, reopen -
Methods inherited from class com.diozero.internal.spi.DeviceFactoryInterface
registerDevice, registerPinDevice, start -
Methods inherited from class com.diozero.internal.spi.AnalogInputDeviceFactoryInterface
provisionAnalogInputDevice -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getI2CDevice
final I2CDeviceInterface getI2CDevice()
-
getBoardPinInfo
<Error class: unknown class> getBoardPinInfo()
-
createAnalogInputDevice
AnalogInputDeviceInterface createAnalogInputDevice(String key, PinInfo pinInfo)
-
readFromChannel
final Short readFromChannel(Integer channel)
Read raw data from the channel (0-7).
-
getValue
@Deprecated(message = "`get` or direct index access is preferred", replaceWith = @ReplaceWith(imports = {}, expression = "get(channel)")) final Float getValue(Integer channel)
Returns a scaled value (0.0 to 1.0) for the given channel.
-
-
-
-