Modbus RTU with RS-485 interface is a half duplex serial uart based protocol and is widely used in the industrial remote control and sensing applications.
Important aspect that needs to be implemented ideally in the micropython firmware is:
1. Hardware flow control pin for the RS-485 transceiver.
2. End of transmission (TX buffer empty) interrupt, before the flow control pin can change from Transmit to Receive mode.
I guess it would be possible to perform a timing calculation and estimate when the TX buffer
empty based on baudrate and buffer length, but it would be inefficient.should be
Ideally it should be done using hardware UART TX interrupt.
I would like to hear if anyone has found a solution, particularly for the pyboard.
Not sure if there is any further new development happening at the current pyboard level, but the UART class would benefit with the inclusion of RS-485 support as well as callbacks for RX and TX.
I see that Pycom have implemented Modbus RTU for their micropython ESP32 modules.