Example Code for Serial Port Assistant-RS485 Relay Control
Last revision 2025/12/26
This article guides users through controlling an RS485 relay using Serial Port Assistant, covering hardware setup with LattePanda boards, software preparation, wiring diagrams, and sending correct commands for relay control.
Hardware Preparation
- DFR0545 LattePanda Alpha & Delta x 1
- DFR0779 RS485 Connector Expansion Shield for LattePanda Alpha&Delta x 1
- DFR0290 8 Channel IoT Ethernet Relay Controller (Support PoE and RS485) x1
Software Preparation
- Download driverDownload driver
Note: the driver needs to be installed when using on Windows for the first time. There is no need to install driver in Linux system.
Wiring Diagram
- Plug the shield into LattePanda Alpha & Delta:
You need to use nylon columns and nylon screws to fix the expansion board and LattePanda.

Use serial port debugging assistant
- After connecting Lattepanda Alpha & Delta and RS485 interface extension board, boot up
- Power on RLY-8-PoE-RS485 8-channel network control relay module
- According to the custom communication rules of the 8-channel network control relay module, use the serial port debugging tool to send the correct instructions, then control the relay module.
Result
As shown in the picture below, control the switch of relay No. 1

Was this article helpful?
