Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Arduino IDE demo source code for KC868-A16]--#10-KC868-A16_RS485_send and receive
#1
[Arduino IDE demo source code for KC868-A16]--#10-KC868-A16_RS485_send and receive

.zip   KC868-A16-RS485.zip (Size: 571.74 KB / Downloads: 502)

   

Code:
/*KC868-A16   RS485 SEND AND RECEIVE CODE*/


void setup() {
  Serial.begin(115200);
   // Serial2.begin(115200,SERIAL_8N1,32,33);//a8&a8s
  Serial2.begin(115200,SERIAL_8N1,16,13);//a16
  //Serial2.begin(115200,SERIAL_8N1,16,14);//a32
  //Serial2.begin(115200,SERIAL_8N1,13,14);//a64
   Serial2.println("RS485 SEND is OK!!");
   Serial2.println("******************");
 
}

void loop() {
  /*print the received data of RS485 port*/
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it
   }
  delay(200);
}
Reply


Messages In This Thread
[Arduino IDE demo source code for KC868-A16]--#10-KC868-A16_RS485_send and receive - by KinCony Support - 08-26-2022, 12:51 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)