KioGPIOBoard Object

This class allows the user to control general purpose input and output behavior on GPIO devices. Common operations include monitoring states for different ports, reading voltages, and sending commands to the device.

Functions

Type Signature
int getType()
Returns the type of GPIO device referenced.
boolean isOpen()
This function is used to check if a connection is open.
String getDeviceInfo()
This function can be used to retrieve a JSON string of device info.
void setPortIOStates(Int64)
Sets the pin direction for all pins at once.
void setPortStates(Int64)
Sets the output value on all ports at once.
void setPortState(int, boolean )
Sets the output state on the specified pin.
long getPortStates()
Returns an Int64 number representing all of the port input states.
boolean getPortState(int)
Gets the input state of the specified pin.
long readVoltage(int)
Reads the analog voltage for the specified pin.
String writeRead(String)
Sends the raw data to the board and returns the response as a string.
boolean i2cTxString(byte, String, int)
Transmits string data to the device with the given address.
boolean i2cTxBytes(byte, String, int)
Transmits an array of bytes to the device with the given address.
String i2cRxString(byte, byte, int, int)
Receives string data from the device with the given address and register address.
String i2cRxBytes(byte, byte, int, int)
Receives raw data from the device with the given address and register address.

Page Callbacks

Type Signature
function(success) onNumatoGPIOOpened
Success is true if the connection was opened (or was already open) and false when failing to connect.

Related Types

Type Signature
Enum GPIOTypes
Types of GPIO devices.