Example Code for Host Computer-RS485 Relay Control

This article offers a comprehensive guide for controlling RS485 relays using host computer software, detailing hardware requirements, software preparations, wiring instructions, and operational steps to efficiently manage relay modules with LattePanda Alpha & Delta systems.

Hardware Preparation

Software Preparation

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

  1. Plug the shield into LattePanda Alpha & Delta:

Connection graph

You need to use nylon columns and nylon screws to fix the expansion board and LattePanda.

Connection2

Use host computer software

  1. After connecting Lattepanda Alpha & Delta and RS485 interface extension board, boot up
  2. Power on RLY-8-PoE-RS485 8-channel network control relay module
  3. Open the host computer software produced by DFRobot on LattePanda Alpha & Delta, select COM1 serial port, and set the baud rate to 115200
  4. Use the host computer software to operate the relay module

Host PC Software

Result

Result

Was this article helpful?

TOP