AST-CAN485 Hookup Guide
Example: Simple RS485 Network
In this example, a simple two node RS485 bus network is constructed. One node transmits a message every 500ms. The other receives it and passes it on over the serial port to a PC.
The following materials are required for this example. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.
- 2x CAN485
- USB Cable
- 2x 120Ω Resistors*
- Breadboard, Jumper Wires, etc
Construct the network as shown.
Ensure that the CAN485 boards and RS485 library have been installed. The example code is installed with the RS485 library. It is available in the Arduino IDE under the examples menu.
Upload the receiver example code to the receiver node. Then upload the transmitter example code to the transmitter node.
What You Should See
The transmitter node will send a message every 500ms. The receiver node will receive it and pass it on to the PC over the serial port. Open the serial port on the PC using the Arduino Serial Monitor (or your favorite serial terminal) at 115200baud.