Skip to main content

RS485

ESP32 Open IoT and IIoT Gateways (P01 & P02)

epositories:

In this example:

  • transceiver 1 (A1 and B1 pins) is configured as a receiver
  • transceiver 2 (A2 and B2 pins) is configured as a transmitter

Connect the ports as shown in the picture.

2b37eca5-97fe-41e5-9a3e-a218fbc71eb5.png

In this way there is a possibility to do a test and adapt to working with external devices. On the developer side there is an option to configure serial port parameters.

Default settings:

  • baud rate: 115200
  • data bits: 8
  • parity bits: 0
  • stop bits: 1
  • receiver timeout: 3s

Voltage levels in RS485 standard are equal to MCU logic levels 0-3.3 V

After flashing, open serial port monitor and find out if the demo works properly.

400b776b-a0ea-4079-b1ce-b182dbbc7959.png