bertmelis / esp32ModbusRTU

modbus RTU client for ESP32
MIT License
71 stars 44 forks source link

MAX485 connection to ESP WROOM 32 #10

Open salvq opened 5 years ago

salvq commented 5 years ago

Hello, trying to understand MAX485 connection to ESP32 from your schema and sketch, please help me to understand.

I have ESP WROOM 32 pinnout image

Your setup for SDM630 is "The ESP is connected to a max3485 with pins 17 (RX), 4 (TX) and 16 as RTS.".

Based on my pinnout, is it correct to be sketch changed to ?

So your sentence for my setup would become "The ESP is connected to a max3485 with pins 16 (RX), 17 (TX) and 4 as RTS."

Thanks

bertmelis commented 5 years ago

I have no experience with your module. But you can see in the example you have to 'begin' the serial interface yourself. Here you can assign the pins yourself.

The RTS pin should be provided in the modbus object's constructor. This again can be any gpio pin.