bertmelis / esp32ModbusRTU

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

RS232 Question #49

Closed Tsaadon closed 3 years ago

Tsaadon commented 3 years ago

Hello everyone, I was wondering if this library could also work with RS232 communication or is it only for RS485? and if it does not, could you give me any quick guidance on how to read data from a sensor communicating in RS232? Thanks, Tal.

bertmelis commented 3 years ago

In fact, this library is completely unaware of the actual interface. It does use the UART hardware of your ESP but if you connect that one directly to your device, over RS485 or RS232 doesn't matter.

It is however up to you -in your code- to setup Serial using the correct parameters (baud, bits, invert...)

Tsaadon commented 3 years ago

Ok great, thanks for the info.