public final class InputOutput
extends java.lang.Object
Constructor and Description |
---|
InputOutput() |
Modifier and Type | Method and Description |
---|---|
static void |
activateGPIO(Raspberry rpi,
Device device)
activateGPIO: This method activate the GPIO port specified, according to their level activation
|
static void |
deactivateGPIO(Raspberry rpi,
Device device)
deactivateGPIO: This method deactivate the GPIO port specified, according to their level activation and de-activation.
|
static java.lang.String |
getHWBoard()
getHWBoard: Get the type of Raspberry board
|
static com.pi4j.io.gpio.Pin |
getPinPi4j(int n)
getPinPi4j: convert the number of pin (integer) to type Pi4J.Pin
|
static Raspberry |
initAllDevices(Raspberry rpi,
Server server)
initAllDevices: This method initializes all the physical devices of the raspberry.
|
static int |
readADS1115(com.pi4j.io.i2c.I2CDevice i2cDevice,
byte highConfig,
byte lowConfig)
readADS1115: This method read the ADS1115, previously configured, with the specified options
|
static int |
readADS1115(com.pi4j.io.i2c.I2CDevice i2cDevice,
java.lang.String config)
readADS1115: This method read the ADS1115, previously configured, with the options specified
|
static Device |
readGPIO(Raspberry rpi,
Device device)
readGPIO: This method read the GPIO port specified.
|
static Device |
readI2C(Raspberry rpi,
Device device)
readI2C: This method return the device with the data value read from the I2C device
|
static Device |
setDefault(Raspberry rpi,
Device device)
setDefault: this method set the GPIO port to the default value.
|
public static java.lang.String getHWBoard()
public static void activateGPIO(Raspberry rpi, Device device)
rpi
- Object who represents the actual hardware.device
- Device with the logical value.public static void deactivateGPIO(Raspberry rpi, Device device)
rpi
- Object who represents the actual hardware.device
- Device with the logical value.public static Device readGPIO(Raspberry rpi, Device device)
rpi
- Object who represents the actual hardware.device
- Device with the logical value.public static com.pi4j.io.gpio.Pin getPinPi4j(int n)
n:
- number of pin.public static Device readI2C(Raspberry rpi, Device device)
rpi
- Object who represents the actual hardware.device
- Device with the logical value.public static int readADS1115(com.pi4j.io.i2c.I2CDevice i2cDevice, java.lang.String config)
i2cDevice
- I2C Deviceconfig
- String with the configuration.public static int readADS1115(com.pi4j.io.i2c.I2CDevice i2cDevice, byte highConfig, byte lowConfig)
i2cDevice
- I2C DevicehighConfig
- High byte with the configuration.lowConfig
- Low byte with the configuration.public static Raspberry initAllDevices(Raspberry rpi, Server server)
server
- Server with the logical values.rpi
- Object who represents the actual hardware.