ArduinoModbus : Modbus Client class
Perform a "Read Discrete Inputs" operation for the specified address for a single discrete input.
int discreteInputRead(int address);
int discreteInputRead(int id, int address);
id (slave) - id of target, defaults to 0x00 if not specified
Address - address to use for operation
discrete input value on success, -1 on failure.
ModbusClient Class