I try with this code and communicate with two esp32. When i directly connect one esp32 RXTD and TXD pin to another esp32 TXD and RXD pin then it communicate and run modbus communication. But when i connect two max485 trans-receiver module then communication not established. I send circuit diagram. Please suggest me.Hello.
I'm maintainer of the mentioned library and just noticed your thread. Get my 5 cents.
1. Take a look coments in code below.
2. The library is designed to control DE/RE by itself. Also refere comments in code bellow.
3. Callback function is fired on various events. As for callback mentioned in read*/write* functions it's called at request end and allows to gets result code of 0x00 on success or Modbus Error code on error.
Attachments
-
23.4 KB Views: 9
-
449.9 KB Views: 8