Open saspol opened 5 years ago
Definitely use the setDebugStream function.
If you have a second mega or any other board I would also try spying on the serial communication. That is, run your first mega with your desired program connected to your RS485 adapter and your modbus device. On your second mega connect the Rx of Serial1 to the Tx of the RS485 adapter, the Rx of Serial2 to the Rx of the adapter. Then run a very simple program that mirrors both back to the terminal: while (Serial1.available()) Serial.print(Serial1.read()); while (Serial2.available()) Serial.print(Serial2.read());
Hi, i trying to use this library on Mega:
HardwareSerial modbusSerial = Serial2; modbusMaster modbus;