Uses of Class
com.diozero.api.RuntimeIOException
-
Packages that use RuntimeIOException Package Description com.diozero.api Core APIs for interfacing with devices.com.diozero.devices Classes representing actual devices such as LEDs, Buttons as well as GPIO, devices that are connected via I2C, SPI and Serial interfaces.com.diozero.devices.mcp23xxx com.diozero.devices.motor com.diozero.devices.sandpit com.diozero.internal com.diozero.internal.board.odroid com.diozero.internal.provider.builtin The built-in default provider supporting GPIO, I2C, SPI and Serial device communication.com.diozero.internal.spi Service Provider Interface package. -
-
Uses of RuntimeIOException in com.diozero.api
Subclasses of RuntimeIOException in com.diozero.api Modifier and Type Class Description class
DeviceAlreadyOpenedException
class
DeviceBusyException
class
InvalidModeException
class
NoSuchDeviceException
class
RuntimeInterruptedException
Methods in com.diozero.api that throw RuntimeIOException Modifier and Type Method Description byte[]
I2CSMBusInterface. blockProcessCall(int register, byte... txData)
SMBus Block Write - Block Read Process CallDigitalInputDevice
DigitalInputDevice.Builder. build()
int
SerialDevice. bytesAvailable()
Get the number of bytes that are available to be readint
SerialDeviceInterface. bytesAvailable()
Get the number of bytes that are available to be readvoid
AnalogInputDevice. close()
void
DeviceInterface. close()
Close this devicevoid
DigitalInputOutputDevice. close()
void
I2CDevice. close()
Close this devicevoid
SpiDevice. close()
Close this deviceprotected void
PwmOutputDevice. fadeInOutLoop(float fadeTime, int steps, int iterations, boolean background)
float
AnalogInputDevice. getScaledValue()
Get the scaled value in the range 0..range (if unsigned) or -range..range (if signed)float
AnalogInputDevice. getUnscaledValue()
Get the unscaled normalised value in the range 0..1 (if unsigned) or -1..1 (if signed)boolean
DigitalInputDevice. getValue()
Read the current underlying state of the input pin.boolean
DigitalInputDeviceInterface. getValue()
boolean
DigitalInputOutputDevice. getValue()
Read the current underlying state of the input pin.float
PwmOutputDevice. getValue()
Get the current PWM output value (0..1).boolean
DigitalInputDevice. isActive()
Read the current on/off state for this device taking into account the pull up / down configuration.boolean
DigitalOutputDevice. isOn()
Get the device on / off status.boolean
PwmOutputDevice. isOn()
Get the device on / off status.void
DigitalOutputDevice. off()
Turn off the device compensating for active low/high logic levels.void
PwmOutputDevice. off()
Turn off the device (same assetValue(0)
).void
DigitalOutputDevice. on()
Turn on the device compensating for active low/high logic levels.void
PwmOutputDevice. on()
Turn on the device (same assetValue(1)
).void
DigitalOutputDevice. onOffLoop(float onTime, float offTime, int n, boolean background, Action stopAction)
Toggle the device on-off.protected void
PwmOutputDevice. onOffLoop(float onTime, float offTime, int n, boolean background)
default boolean
I2CSMBusInterface. probe()
Probe this I2C device usingAuto
probe modeboolean
I2CSMBusInterface. probe(I2CDevice.ProbeMode mode)
Probe this I2C device to see if it is connectedshort
I2CSMBusInterface. processCall(int register, short data)
SMBus Process Callint
SerialDevice. read()
Read a single byte returning error responsesint
SerialDevice. read(byte[] buffer)
Attempt to read buffer.length bytes into the specified buffer, returning the number of bytes actually read; throw a RuntimeIOException if an I/O error occursint
SerialDeviceInterface. read()
Read a single byte returning error responsesint
SerialDeviceInterface. read(byte[] buffer)
Attempt to read buffer.length bytes into the specified buffer, returning the number of bytes actually read; throw a RuntimeIOException if an I/O error occursboolean
I2CDevice. readBit(int register, int bit)
Utility method that wrapsI2CDevice.readByteData(int)
to check if the specified bit number is set.byte[]
I2CSMBusInterface. readBlockData(int register)
SMBus Block Read:i2c_smbus_read_block_data()
byte
I2CDevice. readByte()
SMBus Receive Byte:i2c_smbus_read_byte()
byte
I2CSMBusInterface. readByte()
SMBus Receive Byte:i2c_smbus_read_byte()
byte
SerialDevice. readByte()
Read a single byte, throw an exception if unable to read any databyte
SerialDeviceInterface. readByte()
Read a single byte, throw an exception if unable to read any databyte
I2CDevice. readByteData(int register)
SMBus Read Byte:i2c_smbus_read_byte_data()
byte
I2CSMBusInterface. readByteData(int register)
SMBus Read Byte:i2c_smbus_read_byte_data()
int
I2CDevice. readBytes(byte[] buffer)
Read the specified number of bytes from the device without the 32 byte limit imposed by SMBus.byte[]
I2CDevice. readBytes(int length)
Utility method that wrapsI2CDevice.readBytes(byte[])
to read the specified number of bytes.int
I2CDeviceInterface. readBytes(byte[] buffer)
Read the specified number of bytes from the device without the 32 byte limit imposed by SMBus.ByteBuffer
I2CDevice. readBytesAsByteBuffer(int length)
Utility method that wraps the response fromI2CDevice.readBytes(int)
in aByteBuffer
that is configured to use thebyte order
specified in the constructor.int
I2CSMBusInterface. readI2CBlockData(int register, byte[] buffer)
I2C Block Read:i2c_smbus_read_i2c_block_data()
byte[]
I2CDevice. readI2CBlockDataByteArray(int register, int length)
Utility method that wrapsI2CDevice.readI2CBlockData(int, byte[])
to read the specified number of bytes and return as a new byte array.ByteBuffer
I2CDevice. readI2CBlockDataByteBuffer(int register, int length)
Utility method that wrapsI2CDevice.readI2CBlockData(int, byte[])
to read the specified number of bytes and return as aByteBuffer
using thebyte order
specified in the device constructor.int
I2CDevice. readInt(int register)
Utility method that wrapsI2CDevice.readI2CBlockDataByteBuffer(int, int)
to read a signed int value from the requested register using thebyte order
specified in the constructor.short
I2CDevice. readShort(int register)
Utility method that invokes eitherI2CDevice.readWordData(int)
orI2CDevice.readWordSwapped(int)
to read a signed short value from the requested register in thebyte order
specified in the constructor.short
I2CDevice. readUByte(int register)
Utility method that simply converts the response fromI2CDevice.readByteData(int)
to an unsigned byte.long
I2CDevice. readUInt(int register)
Utility method that wrapsI2CDevice.readInt(int)
to read an unsigned int value from the requested register using thebyte order
specified in the constructor.long
I2CDevice. readUInt(int register, int numBytes)
Utility method that wrapsI2CDevice.readI2CBlockDataByteArray(int, int)
to read an unsigned int value on the specified length from the requested register using thebyte order
specified in the constructor.int
I2CDevice. readUShort(int register)
Utility method that wrapsI2CDevice.readShort(int)
to read an unsigned short value from the requested register using thebyte order
specified in the constructor.short
I2CDevice. readWordData(int register)
SMBus Read Word:i2c_smbus_read_word_data()
short
I2CSMBusInterface. readWordData(int register)
SMBus Read Word:i2c_smbus_read_word_data()
short
I2CDevice. readWordSwapped(int register)
SMBus Read Word Swapped:i2c_smbus_read_word_swapped()
default short
I2CSMBusInterface. readWordSwapped(int register)
SMBus Read Word Swapped:i2c_smbus_read_word_swapped()
void
DigitalOutputDevice. setOn(boolean on)
Turn the device on or off.void
PwmOutputDevice. setPwmFrequency(int pwmFrequency)
void
DigitalInputOutputDevice. setValue(boolean value)
Set the output value (if in output mode).void
DigitalOutputDevice. setValue(boolean value)
Set the device output value without compensating for active low/high logic levels.void
PwmOutputDevice. setValue(float value)
Set the PWM output value (0..1).protected void
PwmOutputDevice. setValueInternal(float value)
void
DigitalOutputDevice. toggle()
Toggle the state of the device.void
PwmOutputDevice. toggle()
Toggle the state of the device (same assetValue(1 - getvalue())
).void
SerialDevice. write(byte... buffer)
Write the byte buffer to the devicevoid
SerialDeviceInterface. write(byte... data)
Write the byte buffer to the devicevoid
SpiDevice. write(byte... txBuffer)
Write the entire contents ofdata
to the devicevoid
SpiDevice. write(byte[] txBuffer, int txOffset, int length)
Writelength
bytes fromdata
starting atoffset
void
SpiDeviceInterface. write(byte... data)
Write the entire contents ofdata
to the devicevoid
SpiDeviceInterface. write(byte[] data, int offset, int length)
Writelength
bytes fromdata
starting atoffset
byte[]
SpiDevice. writeAndRead(byte... out)
Write thedata
to the device then readdata.length
bytes from the devicebyte[]
SpiDeviceInterface. writeAndRead(byte... data)
Write thedata
to the device then readdata.length
bytes from the devicevoid
I2CDevice. writeBit(int register, int bit, boolean value)
Utility method that wrapsI2CDevice.readByteData(int)
andI2CDevice.writeByteData(int, byte)
to update the specified bit numbervoid
I2CSMBusInterface. writeBlockData(int register, byte... data)
SMBus Block Write:i2c_smbus_write_block_data()
void
I2CDevice. writeByte(byte data)
SMBus Send Byte:i2c_smbus_write_byte()
void
I2CSMBusInterface. writeByte(byte data)
SMBus Send Byte:i2c_smbus_write_byte()
void
SerialDevice. writeByte(byte bVal)
Write a single byte, throw an exception if unable to write the datavoid
SerialDeviceInterface. writeByte(byte bVal)
Write a single byte, throw an exception if unable to write the datavoid
I2CDevice. writeByteData(int register, byte value)
SMBus Write Byte:i2c_smbus_write_byte_data()
void
I2CDevice. writeByteData(int register, int data)
Utility method that simply casts the int data parameter to byte and callsI2CDevice.writeByteData(int, byte)
void
I2CSMBusInterface. writeByteData(int register, byte data)
SMBus Write Byte:i2c_smbus_write_byte_data()
void
I2CDevice. writeBytes(byte... data)
Write the specified byte array to the device without the 32 byte limit imposed by SMBus.void
I2CDevice. writeBytes(ByteBuffer buffer)
Utility method that wrapsI2CDevice.writeBytes(byte[])
to write the available bytes in the specifiedByteBuffer
.void
I2CDeviceInterface. writeBytes(byte... data)
Write the specified byte array to the device without the 32 byte limit imposed by SMBus.void
I2CDevice. writeI2CBlockData(int register, byte... data)
I2C Block Write:i2c_smbus_write_i2c_block_data()
void
I2CSMBusInterface. writeI2CBlockData(int register, byte... data)
I2C Block Write:i2c_smbus_write_i2c_block_data()
void
I2CSMBusInterface. writeQuick(byte bit)
SMBus Quick Commandvoid
I2CDevice. writeWordData(int register, short value)
SMBus Write Word:i2c_smbus_write_word_data()
void
I2CSMBusInterface. writeWordData(int register, short data)
SMBus Write Word:i2c_smbus_write_word_data()
void
I2CDevice. writeWordSwapped(int register, short value)
SMBus Write Word Swapped:i2c_smbus_write_word_swapped()
default void
I2CSMBusInterface. writeWordSwapped(int register, short data)
SMBus Write Word Swapped:i2c_smbus_write_word_swapped()
Constructors in com.diozero.api that throw RuntimeIOException Constructor Description AnalogInputDevice(int adcNumber)
AnalogInputDevice(int adcNumber, float range)
AnalogInputDevice(AnalogInputDeviceFactoryInterface deviceFactory, int adcNumber)
AnalogInputDevice(AnalogInputDeviceFactoryInterface deviceFactory, int adcNumber, float range)
AnalogInputDevice(AnalogInputDeviceFactoryInterface deviceFactory, PinInfo pinInfo, float range)
DebouncedDigitalInputDevice(int gpio, int debounceTimeMs)
DebouncedDigitalInputDevice(int gpio, GpioPullUpDown pud, int debounceTimeMs)
DigitalInputDevice(int gpio)
DigitalInputDevice(int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
DigitalInputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
DigitalInputDevice(GpioDeviceFactoryInterface deviceFactory, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger, boolean activeHigh)
DigitalInputOutputDevice(int gpio, DeviceMode mode)
DigitalInputOutputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, DeviceMode mode)
DigitalInputOutputDevice(GpioDeviceFactoryInterface deviceFactory, PinInfo pinInfo, DeviceMode mode)
DigitalOutputDevice(int gpio)
Defaults to active high logic, initial value is off.DigitalOutputDevice(int gpio, boolean activeHigh, boolean initialValue)
DigitalOutputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, boolean activeHigh, boolean initialValue)
DigitalOutputDevice(GpioDeviceFactoryInterface deviceFactory, PinInfo pinInfo, boolean activeHigh, boolean initialValue)
I2CDevice(int controller, int address)
I2CDevice(int controller, int address, I2CConstants.AddressSize addressSize)
Use thedefault
byte order
I2CDevice(int controller, int address, I2CConstants.AddressSize addressSize, ByteOrder byteOrder)
Use the default native device factoryI2CDevice(int controller, int address, ByteOrder byteOrder)
Use the default7-bit
address sizeI2CDevice(I2CDeviceFactoryInterface deviceFactory, int controller, int address, I2CConstants.AddressSize addressSize, ByteOrder byteOrder)
Construct an I2C device using the specified I2C bus / controller, device address, address size and byte order.PwmOutputDevice(int gpio)
PwmOutputDevice(int gpio, float initialValue)
PwmOutputDevice(int gpio, int pwmFrequency, float initialValue)
PwmOutputDevice(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int gpio, float initialValue)
PwmOutputDevice(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int pwmOrGpioNum, int pwmFrequency, float initialValue)
PwmOutputDevice(PwmOutputDeviceFactoryInterface pwmDeviceFactory, PinInfo pinInfo, int pwmFrequency, float initialValue)
SerialDevice(String deviceFilename)
Create a new serial device using default values forbaud
,data bits
,stop bits
,parity
,read blocking
,min read chars
andread timeout
SerialDevice(String deviceFilename, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity)
SmoothedInputDevice(int gpio, GpioPullUpDown pud, int threshold, int eventAge, int eventDetectPeriod)
SmoothedInputDevice(GpioDeviceFactoryInterface deviceFactory, int gpio, GpioPullUpDown pud, int threshold, int eventAge, int eventDetectPeriod)
SmoothedInputDevice(GpioDeviceFactoryInterface deviceFactory, PinInfo pinInfo, GpioPullUpDown pud, boolean activeHigh, int threshold, int eventAge, int eventDetectPeriod)
SpiDevice(int chipSelect)
SpiDevice(int controller, int chipSelect)
SpiDevice(int controller, int chipSelect, int frequency, SpiClockMode mode, boolean lsbFirst)
-
Uses of RuntimeIOException in com.diozero.devices
Methods in com.diozero.devices that throw RuntimeIOException Modifier and Type Method Description void
Buzzer. beep()
Beep repeatedly in a background thread.void
Buzzer. beep(float onTime, float offTime, int n, boolean background)
Beep.void
LED. blink()
Blink indefinitely with 1 second on and 1 second off.void
LED. blink(float onTime, float offTime, int n, boolean background)
Blink.void
LED. blink(float onTime, float offTime, int n, boolean background, Action stopAction)
Blink.void
LED. blink(Action stopAction)
Blink indefinitely with 1 second on and 1 second off.void
PwmLed. blink()
Blink the LED on and off indefinitely.void
PwmLed. blink(float onTime, float offTime, int iterations, boolean background)
Blink the LED on and off repeatedly.Button
Button.Builder. build()
void
BME280. close()
Closes the devicevoid
GpioExpander. close()
void
HD44780Lcd. close()
void
HD44780Lcd.LcdConnection. close()
void
HD44780Lcd.PCF8574LcdConnection. close()
void
HD44780Lcd.PiFaceCadLcdConnection. close()
void
LedBarGraph. close()
void
MCP23008. close()
void
MCP23017. close()
void
MCP23S17. close()
void
McpAdc. close()
void
PCA9685. close()
void
PCF8591. close()
void
PiconZero. close()
void
PwmLedBarGraph. close()
void
PCA9685. closeChannel(int channel)
protected void
PiconZero.PiconZeroAnalogOutputDevice. closeDevice()
protected void
PiconZero.PiconZeroPwmOutputDevice. closeDevice()
AnalogInputDeviceInterface
McpAdc. createAnalogInputDevice(String key, PinInfo pinInfo)
AnalogInputDeviceInterface
PCF8591. createAnalogInputDevice(String key, PinInfo pinInfo)
AnalogOutputDeviceInterface
PCF8591. createAnalogOutputDevice(String key, PinInfo pinInfo, float initialValue)
AnalogOutputDeviceInterface
PiconZero. createAnalogOutputDevice(String key, PinInfo pinInfo, float initialValue)
GpioDigitalInputDeviceInterface
PCF8574. createDigitalInputDevice(String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger)
GpioDigitalInputDeviceInterface
PiconZero. createDigitalInputDevice(String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger)
GpioDigitalInputOutputDeviceInterface
PCF8574. createDigitalInputOutputDevice(String key, PinInfo pinInfo, DeviceMode mode)
GpioDigitalInputOutputDeviceInterface
PiconZero. createDigitalInputOutputDevice(String key, PinInfo pinInfo, DeviceMode mode)
GpioDigitalOutputDeviceInterface
PCF8574. createDigitalOutputDevice(String key, PinInfo pinInfo, boolean initialValue)
GpioDigitalOutputDeviceInterface
PiconZero. createDigitalOutputDevice(String key, PinInfo pinInfo, boolean initialValue)
PwmOutputDeviceInterface
PCA9685. createPwmOutputDevice(String key, PinInfo pinInfo, int pwmFrequency, float initialValue)
PwmOutputDeviceInterface
PiconZero. createPwmOutputDevice(String key, PinInfo pinInfo, int pwmFrequency, float initialValue)
float
DistanceSensorInterface. getDistanceCm()
float
GP2Y0A21YK. getDistanceCm()
Read distance in centimetres, range 10 to 80cm.float
HCSR04. getDistanceCm()
Send a pulse to HCSR04 and compute the echo to obtain distancefloat
LDR. getLdrResistance()
Read the resistance across the LDR.float
BH1750. getLuminosity()
float
LuminositySensorInterface. getLuminosity()
float
TSL2561. getLuminosity()
Converts the raw sensor values to the standard SI lux equivalent.float
BarometerInterface. getPressure()
Get the pressure in kPafloat
BMP180. getPressure()
Read the barometric pressure (in hPa) from the device.float
TMP36. getScaledValue()
float
BMP180. getTemperature()
Method for reading the temperature.float
LM73. getTemperature()
float
ThermometerInterface. getTemperature()
Get temperature in degrees celsiusfloat
TMP36. getTemperature()
Get the current temperature in °C.float
W1ThermSensor. getTemperature()
Get temperature in degrees celsiusfloat
McpAdc. getValue(int adcPin)
Read the analog value in the range 0..1 or -1..1 (if the ADC type is signed)float
PCA9685. getValue(int channel)
float
PCF8591. getValue(int adcPin)
Read the analog value in the range 0..1float
PiconZero.PiconZeroAnalogInputDevice. getValue()
float
PiconZero.PiconZeroAnalogOutputDevice. getValue()
boolean
PiconZero.PiconZeroDigitalInputDevice. getValue()
float
PiconZero.PiconZeroPwmOutputDevice. getValue()
boolean[]
RgbLed. getValues()
Get the state of all LEDs.float[]
RgbPwmLed. getValues()
Get the value of all LEDs.boolean
LED. isLit()
Return true if the LED is currently on.boolean
PwmLed. isLit()
Return true if the PWM value is >0.void
RgbLed. off()
Turn all LEDs off.void
RgbPwmLed. off()
Turn all LEDs off.void
RgbLed. on()
Turn all LEDs on.void
RgbPwmLed. on()
Turn all LEDs on.AnalogInputDeviceInterface
PiconZero. provisionAnalogInputDevice(PinInfo pinInfo)
void
PwmLed. pulse()
Pulse the LED on and off indefinitely in a background thread with a fade time of 1 second.void
PwmLed. pulse(float fadeTime, int steps, int iterations, boolean background)
Pulse the LED on and off repeatedly.void
BMP180. readCalibrationData()
This method reads the calibration data common for the Temperature sensor and Barometer sensor included in the BMP180void
TSL2561. setGain(int gain)
Adjusts the gain on the TSL2561 (adjusts the sensitivity to light)void
PiconZero.PiconZeroPwmOutputDevice. setPwmFrequency(int frequencyHz)
void
PCA9685. setServoPulseWidthMs(int channel, double pulseWidthMs)
Set the pulse duration (micro-seconds) E.g.void
PCA9685. setValue(int channel, float value)
Set PWM output on a specific channel, value must be 0..1void
PCF8591. setValue(int dacPin, float value)
Set the analog output value.void
PiconZero.PiconZeroAnalogOutputDevice. setValue(float value)
void
PiconZero.PiconZeroPwmOutputDevice. setValue(float value)
void
RgbLed. setValues(boolean red, boolean green, boolean blue)
Set the state of all LEDs.void
RgbPwmLed. setValues(float red, float green, float blue)
Set the value of all LEDs.void
RgbLed. toggle()
Toggle the state of all LEDs.void
RgbPwmLed. toggle()
Toggle the state of all LEDs.Constructors in com.diozero.devices that throw RuntimeIOException Constructor Description BME280()
Creates an instance that uses I2C.BME280(int chipSelect)
Creates an instance that uses SPI.BME280(int bus, int address)
Creates an instance that uses I2C.BME280(int controller, int chipSelect, int frequency, SpiClockMode mode)
Creates an instance that uses SPI.BMP180(int controller, BMP180.BMPMode mode)
BMP180(BMP180.BMPMode mode)
ConstructorButton(int gpio)
Button(int gpio, GpioPullUpDown pud)
Button(int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
Button(GpioDeviceFactoryInterface deviceFactory, int gpio, GpioPullUpDown pud, GpioEventTrigger trigger)
Button(GpioDeviceFactoryInterface deviceFactory, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger, boolean activeHigh)
Buzzer(int gpio)
Buzzer(int gpio, boolean activeHigh)
GP2Y0A21YK(int gpio)
GP2Y0A21YK(AnalogInputDeviceFactoryInterface deviceFactory, int gpio)
HCSR04(int triggerGpioNum, int echoGpioNum)
Initialise GPIO to echo and trigger pinsHTS221(int controller, int address)
LDR(int gpio, float r1)
LDR(AnalogInputDeviceFactoryInterface deviceFactory, int gpio, float r1)
LED(int gpio)
LED(int gpio, boolean activeHigh)
LED(PinInfo pinInfo, boolean activeHigh, boolean initialValue)
LED(GpioDeviceFactoryInterface deviceFactory, int gpio)
MCP23008()
MCP23008(int interruptGpio)
MCP23008(int interruptGpioA, int interruptGpioB)
MCP23008(int controller, int address, int interruptGpio)
MCP23008(int controller, int address, int interruptGpioA, int interruptGpioB)
MCP23017()
MCP23017(int interruptGpio)
MCP23017(int interruptGpioA, int interruptGpioB)
MCP23017(int controller, int address, int interruptGpio)
MCP23017(int controller, int address, int interruptGpioA, int interruptGpioB)
MCP23S17(int boardAddress)
MCP23S17(int boardAddress, int interruptGpio)
MCP23S17(int boardAddress, int interruptGpioA, int interruptGpioB)
MCP23S17(int controller, int chipSelect, int boardAddress, int interruptGpio)
MCP23S17(int controller, int chipSelect, int address, int frequency, int interruptGpioA, int interruptGpioB)
McpAdc(McpAdc.Type type, int chipSelect, float vRef)
McpAdc(McpAdc.Type type, int controller, int chipSelect, float vRef)
PCA9685(int pwmFrequency)
PCA9685(int controller, int pwmFrequency)
PCA9685(int controller, int address, int pwmFrequency)
PwmLed(int gpio)
PwmLed(int gpio, float initialValue)
PwmLed(PwmOutputDeviceFactoryInterface deviceFactory, int gpio)
PwmLed(PwmOutputDeviceFactoryInterface deviceFactory, int gpio, float initialValue)
RgbLed(int redPin, int greenPin, int bluePin)
RgbLed(GpioDeviceFactoryInterface deviceFactory, int redPin, int greenPin, int bluePin)
RgbPwmLed(int redPin, int greenPin, int bluePin)
RgbPwmLed(PwmOutputDeviceFactoryInterface deviceFactory, int redPin, int greenPin, int bluePin)
Servo(int gpio, float initialPulseWidthMs)
Servo(int gpio, float initialPulseWidthMs, int pwmFrequency)
Servo(int gpio, float initialPulseWidthMs, int pwmFrequency, Servo.Trim trim)
Servo(int gpio, float initialPulseWidthMs, Servo.Trim trim)
Servo(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int gpio, float initialPulseWidthMs, int pwmFrequency)
Servo(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int gpio, float initialPulseWidthMs, int pwmFrequency, Servo.Trim trim)
Servo(PwmOutputDeviceFactoryInterface pwmDeviceFactory, PinInfo pinInfo, float initialPulseWidthMs, int pwmFrequency, Servo.Trim trim)
TMP36(AnalogInputDeviceFactoryInterface deviceFactory, int gpio, float tempOffset)
TSL2561(int controller, TSL2561.TSL2561Package tsl2561Package)
TSL2561(TSL2561.TSL2561Package tsl2561Package)
-
Uses of RuntimeIOException in com.diozero.devices.mcp23xxx
Methods in com.diozero.devices.mcp23xxx that throw RuntimeIOException Modifier and Type Method Description void
MCP23xxx. close()
protected void
MCP23xxxDigitalInputDevice. closeDevice()
protected void
MCP23xxxDigitalInputOutputDevice. closeDevice()
protected void
MCP23xxxDigitalOutputDevice. closeDevice()
void
MCP23xxx. closeGpio(int gpio)
boolean
MCP23xxx. getValue(int gpio)
boolean
MCP23xxxDigitalInputDevice. getValue()
boolean
MCP23xxxDigitalInputOutputDevice. getValue()
boolean
MCP23xxxDigitalOutputDevice. getValue()
void
MCP23xxx. setValue(int gpio, boolean value)
void
MCP23xxxDigitalInputOutputDevice. setValue(boolean value)
void
MCP23xxxDigitalOutputDevice. setValue(boolean value)
Constructors in com.diozero.devices.mcp23xxx that throw RuntimeIOException Constructor Description MCP23xxx(int numPorts, String deviceName)
MCP23xxx(int numPorts, String deviceName, int interruptGpio)
MCP23xxx(int numPorts, String deviceName, int interruptGpioA, int interruptGpioB)
-
Uses of RuntimeIOException in com.diozero.devices.motor
Methods in com.diozero.devices.motor that throw RuntimeIOException Modifier and Type Method Description void
DigitalMotor. backward()
void
DualMotor. backward(float speed)
void
MotorInterface. backward(float speed)
void
PiconZeroMotor. backward(float speed)
void
PwmMotor. backward()
Backward at full speedvoid
PwmMotor. backward(float speed)
void
TB6612FNGMotor. backward(float speed)
void
DualMotor. backwardLeft(float speed)
void
DualMotor. backwardRight(float speed)
void
DigitalMotor. forward()
void
DualMotor. forward(float speed)
void
MotorInterface. forward(float speed)
void
PiconZeroMotor. forward(float speed)
void
PwmMotor. forward()
Forward at full speedvoid
PwmMotor. forward(float speed)
void
TB6612FNGMotor. forward(float speed)
void
DualMotor. forwardLeft(float speed)
void
DualMotor. forwardRight(float speed)
float
DigitalMotor. getValue()
Represents the speed of the motor as a floating point value between -1 (full speed backward) and 1 (full speed forward)float
MotorInterface. getValue()
float
PiconZeroMotor. getValue()
Get the relative output value for the motorfloat
PwmMotor. getValue()
Represents the speed of the motor as a floating point value between -1 (full speed backward) and 1 (full speed forward).float
TB6612FNGMotor. getValue()
Represents the speed of the motor as a floating point value between -1 (full speed backward) and 1 (full speed forward)float[]
DualMotor. getValues()
boolean
DigitalMotor. isActive()
boolean
MotorInterface. isActive()
boolean
PiconZeroMotor. isActive()
boolean
PwmMotor. isActive()
boolean
TB6612FNGMotor. isActive()
void
DigitalMotor. reverse()
void
DualMotor. reverse()
void
MotorBase. reverse()
Reverse direction of the motorsvoid
MotorInterface. reverse()
void
DualMotor. rotateLeft(float speed)
void
DualMotor. rotateRight(float speed)
void
MotorBase. setValue(float value)
Set the speed of the motor as a floating point value between -1 (full speed backward) and 1 (full speed forward)void
MotorInterface. setValue(float value)
void
DualMotor. setValues(float leftValue, float rightValue)
Set the speed and direction for both motors (clockwise / counter-clockwise)void
DigitalMotor. stop()
void
DualMotor. stop()
void
MotorInterface. stop()
void
PiconZeroMotor. stop()
void
PwmMotor. stop()
void
TB6612FNGMotor. stop()
Constructors in com.diozero.devices.motor that throw RuntimeIOException Constructor Description CamJamKitDualMotor()
DigitalMotor(int forwardGpio, int backwardGpio)
DigitalMotor(GpioDeviceFactoryInterface deviceFactory, int forwardGpio, int backwardGpio)
PwmMotor(int forwardPwmGpio, int backwardPwmGpio)
PwmMotor(PwmOutputDeviceFactoryInterface deviceFactory, int forwardPwmGpio, int backwardPwmGpio)
RyanteckDualMotor()
TB6612FNGDualMotorDriver(int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio)
TB6612FNGDualMotorDriver(PwmOutputDeviceFactoryInterface pwmDeviceFactory, int leftMotorClockwiseControlGpio, int leftMotorCounterClockwiseControlGpio, int leftMotorPwmGpio, int rightMotorClockwiseControlGpio, int rightMotorCounterClockwiseControlGpio, int rightMotorPwmGpio)
-
Uses of RuntimeIOException in com.diozero.devices.sandpit
Methods in com.diozero.devices.sandpit that throw RuntimeIOException Modifier and Type Method Description float
HCSR04UsingEvents. getDistanceCm()
Send a pulse to HCSR04 and compute the echo to obtain distancefloat
HCSR04UsingWait. getDistanceCm()
Send a pulse to HCSR04 and compute the echo to obtain distancefloat
VL6180. getDistanceCm()
void
SilentStepStick. setDirection(SilentStepStick.Direction direction)
Sets the direction of rotation, either clockwise or counterclockwise.void
SilentStepStick. setEnabled(boolean enabled)
Enables or disables the stepper driver.void
SilentStepStick. setOn(boolean on)
Turns on/off the stepper motor.Constructors in com.diozero.devices.sandpit that throw RuntimeIOException Constructor Description HCSR04UsingEvents(int triggerGpioNum, int echoGpioNum)
Initialise GPIO to echo and trigger pinsHCSR04UsingWait(int triggerGpioNum, int echoGpioNum)
Initialise GPIO to echo and trigger pinsMotionSensor(int gpio)
Defaults 'threshold' to 1, eventAge t0 20ms and eventDetectPeriod to 10ms.MotionSensor(int gpio, int threshold, int eventAge, int eventDetectPeriod)
MotionSensor(int gpio, GpioPullUpDown pud, int threshold, int eventAge, int eventDetectPeriod)
SilentStepStick(int enablePin, int directionPin, int stepPin, SilentStepStick.Resolution resolution, float speed)
Constructs a new stepper motor instance.The direction defaults to clockwise.The speed defaults to 1 RPM. -
Uses of RuntimeIOException in com.diozero.internal
Methods in com.diozero.internal that throw RuntimeIOException Modifier and Type Method Description void
SoftwarePwmOutputDevice. setPwmFrequency(int frequencyHz)
-
Uses of RuntimeIOException in com.diozero.internal.board.odroid
Methods in com.diozero.internal.board.odroid that throw RuntimeIOException Modifier and Type Method Description float
OdroidC2SysFsPwmOutputDevice. getValue()
void
OdroidC2SysFsPwmOutputDevice. setValue(float value)
-
Uses of RuntimeIOException in com.diozero.internal.provider.builtin
Methods in com.diozero.internal.provider.builtin that throw RuntimeIOException Modifier and Type Method Description protected void
DefaultNativeSerialDevice. closeDevice()
protected void
DefaultNativeSpiDevice. closeDevice()
protected void
SysFsAnalogInputDevice. closeDevice()
protected void
SysFsDigitalInputDevice. closeDevice()
protected void
SysFsDigitalInputOutputDevice. closeDevice()
protected void
SysFsDigitalOutputDevice. closeDevice()
AnalogInputDeviceInterface
DefaultDeviceFactory. createAnalogInputDevice(String key, PinInfo pinInfo)
AnalogOutputDeviceInterface
DefaultDeviceFactory. createAnalogOutputDevice(String key, PinInfo pinInfo, float initialValue)
GpioDigitalInputDeviceInterface
DefaultDeviceFactory. createDigitalInputDevice(String key, PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger)
GpioDigitalInputOutputDeviceInterface
DefaultDeviceFactory. createDigitalInputOutputDevice(String key, PinInfo pinInfo, DeviceMode mode)
GpioDigitalOutputDeviceInterface
DefaultDeviceFactory. createDigitalOutputDevice(String key, PinInfo pinInfo, boolean initialValue)
InternalI2CDeviceInterface
DefaultDeviceFactory. createI2CDevice(String key, int controller, int address, I2CConstants.AddressSize addressSize)
PwmOutputDeviceInterface
DefaultDeviceFactory. createPwmOutputDevice(String key, PinInfo pinInfo, int pwmFrequency, float initialValue)
InternalSerialDeviceInterface
DefaultDeviceFactory. createSerialDevice(String key, String deviceFile, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis)
InternalSpiDeviceInterface
DefaultDeviceFactory. createSpiDevice(String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
boolean
NativeGpioInputDevice. getValue()
boolean
NativeGpioInputOutputDevice. getValue()
boolean
NativeGpioOutputDevice. getValue()
float
SysFsAnalogInputDevice. getValue()
boolean
SysFsDigitalInputDevice. getValue()
boolean
SysFsDigitalInputOutputDevice. getValue()
boolean
SysFsDigitalOutputDevice. getValue()
float
SysFsPwmOutputDevice. getValue()
void
SysFsPwmOutputDevice. setPwmFrequency(int frequencyHz)
void
NativeGpioInputOutputDevice. setValue(boolean value)
void
NativeGpioOutputDevice. setValue(boolean value)
void
SysFsDigitalInputOutputDevice. setValue(boolean value)
void
SysFsDigitalOutputDevice. setValue(boolean value)
void
SysFsPwmOutputDevice. setValue(float value)
byte[]
DefaultNativeSpiDevice. writeAndRead(byte... txBuffer)
-
Uses of RuntimeIOException in com.diozero.internal.spi
Methods in com.diozero.internal.spi that throw RuntimeIOException Modifier and Type Method Description void
DeviceFactoryInterface. close()
Close this device factory including all devices that have been provisioned by it.protected abstract void
AbstractDevice. closeDevice()
InternalI2CDeviceInterface
I2CDeviceFactoryInterface. createI2CDevice(String key, int controller, int address, I2CConstants.AddressSize addressSize)
InternalSerialDeviceInterface
SerialDeviceFactoryInterface. createSerialDevice(String key, String deviceFilename, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis)
InternalSpiDeviceInterface
SpiDeviceFactoryInterface. createSpiDevice(String key, int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
float
AnalogDeviceInterface. getValue()
Read the analog value in the range 0..1 or -1..1 (if the ADC type is signed)boolean
GpioDigitalDeviceInterface. getValue()
float
PwmOutputDeviceInterface. getValue()
Get the current PWM output value (0..1)default AnalogInputDeviceInterface
AnalogInputDeviceFactoryInterface. provisionAnalogInputDevice(PinInfo pinInfo)
default AnalogOutputDeviceInterface
AnalogOutputDeviceFactoryInterface. provisionAnalogOutputDevice(PinInfo pinInfo, float initialValue)
default GpioDigitalInputDeviceInterface
GpioDeviceFactoryInterface. provisionDigitalInputDevice(PinInfo pinInfo, GpioPullUpDown pud, GpioEventTrigger trigger)
default GpioDigitalInputOutputDeviceInterface
GpioDeviceFactoryInterface. provisionDigitalInputOutputDevice(PinInfo pinInfo, DeviceMode mode)
default GpioDigitalOutputDeviceInterface
GpioDeviceFactoryInterface. provisionDigitalOutputDevice(PinInfo pinInfo, boolean initialValue)
default InternalI2CDeviceInterface
I2CDeviceFactoryInterface. provisionI2CDevice(int controller, int address, I2CConstants.AddressSize addressSize)
default PwmOutputDeviceInterface
PwmOutputDeviceFactoryInterface. provisionPwmOutputDevice(PinInfo pinInfo, int pwmFrequency, float initialValue)
default InternalSerialDeviceInterface
SerialDeviceFactoryInterface. provisionSerialDevice(String deviceFilename, int baud, SerialConstants.DataBits dataBits, SerialConstants.StopBits stopBits, SerialConstants.Parity parity, boolean readBlocking, int minReadChars, int readTimeoutMillis)
Provision a serial device.default InternalSpiDeviceInterface
SpiDeviceFactoryInterface. provisionSpiDevice(int controller, int chipSelect, int frequency, SpiClockMode spiClockMode, boolean lsbFirst)
void
PwmOutputDeviceInterface. setPwmFrequency(int frequencyHz)
Set the PWM output frequencyvoid
AnalogOutputDeviceInterface. setValue(float value)
void
GpioDigitalOutputDeviceInterface. setValue(boolean value)
void
PwmOutputDeviceInterface. setValue(float value)
Set the PWM output value (0..1)
-