类 Pcf8591
java.lang.Object
cn.tpkf.rpi.devices.AbstractDevice
cn.tpkf.rpi.devices.i2c.AbstractI2cDevice
cn.tpkf.rpi.devices.i2c.Pcf8591
- 所有已实现的接口:
Device
- 作者:
- Harlan
-
字段概要
字段从类继承的字段 cn.tpkf.rpi.devices.i2c.AbstractI2cDevice
bus, device, i2C从类继承的字段 cn.tpkf.rpi.devices.AbstractDevice
deviceManager, id, lock, name -
构造器概要
构造器 -
方法概要
从类继承的方法 cn.tpkf.rpi.devices.i2c.AbstractI2cDevice
getDescription从类继承的方法 cn.tpkf.rpi.devices.AbstractDevice
shutdown
-
字段详细资料
-
DEFAULT_ADDRESS
The default address. -
AIN_0
The AIN_0 address.
-
-
构造器详细资料
-
Pcf8591
public Pcf8591(DeviceManager deviceManager, String id, String name, Integer bus, Integer device, Integer maxVoltage) Creates an instance of the AbstractI2cDevice class.- 参数:
deviceManager- The DeviceManager instance.id- The ID of the device.name- The name of the device.bus- The bus.device- The device.maxVoltage- The max voltage.
-
Pcf8591
-
-
方法详细资料
-
readAin0
public double readAin0()Reads the value of the AIN_0 address.- 返回:
- The value of the AIN_0 address.
-
readAin1
public double readAin1()Reads the value of the AIN_1 address.- 返回:
- The value of the AIN_1 address.
-
readAin2
public double readAin2()Reads the value of the AIN_2 address.- 返回:
- The value of the AIN_2 address.
-
readAin3
public double readAin3()Reads the value of the AIN_3 address.- 返回:
- The value of the AIN_3 address.
-
read
Reads the value of the specified address.- 参数:
aIn- The address.- 返回:
- The value of the specified address.
-