Instructions

2. USEAGE WITH ARDUINO
1. Connection
Arduino Converter
5 V VCC
Pin 1 TXD
Pin 0 RXD
GND GND
2. Code example
In the following, you will find a code example with which you can test y-
our device. However, for this, you will need an end device for the RS485
connection to enable communication. In this example, we have used the
USB-RS485 adapter (SBC-TTL-RS485) from Joy-it. Note that A+ is connec-
ted to A and B- is connected to B.
Use the Arduino IDE for the code example. Make sure that the correct
Port and Board are selected under Tools.
Copy the following code and click on Upload. Open the serial monitor to
see the output.
Now you can communicate with your Arduino via a terminal programme
such as HTerm. Make sure that you set the baud rate to the same speed
as your Arduino, in this example 9600. The data received from the Ardui-
no is displayed on the serial monitor.
String testString; //Declaring a variable
void setup() {
Serial.begin(9600); // Enable serial communication
}
void loop() {
Serial.println("Please enter Test-String: ");
while (Serial.available()==0) {} // Waiting for input
testString=Serial.readString(); //Read out the input
Serial.println("The Test-String received is: " + testString);
Serial.println("----------------------------------------------");
delay(2000);
}