CMB27 / ModbusRTUSlave

This is an Arduino library that implements the slave/server logic of the Modbus RTU protocol.
MIT License
58 stars 14 forks source link

Not enough time to transmit a packet with TTL-RS485 and standart Serial #5

Closed pr4rt0r closed 2 years ago

pr4rt0r commented 2 years ago

image

CMB27 commented 2 years ago

Thank you for pointing this out. I added _serial->flush(); after the _serial->write(_buf, len + 2); line. This will cause the program to wait until _serial has finished writing.