RS-485 modbus library

Try to setup the parity on the Serial interface manually after calling begin on your ModbusMaster instance:

ModbusMaster sensor;

setup() {
  sensor.begin(1, Serial1); // using slave ID 1 on Serial
  Serial1.begin(4800, SERIAL_8O1);
  // ... test a comm here
}

Also what chip do you use to communicate with your device?

1 Like