Smart Home Automation Forum

Full Version: [Arduino IDE demo source code for KC868-AI]--#06-KC868-AI_RS485_code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Arduino IDE demo source code for KC868-AI]--#06-KC868-AI_RS485_code

Code:
void setup() {
  // put your setup code here, to run once:
Serial2.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial2.println("KinCony");
delay(500);
}
(07-06-2022, 01:07 AM)KinCony Support Wrote: [ -> ][Arduino IDE demo source code for KC868-AI]--#06-KC868-AI_RS485_code

Code:
void setup() {
  // put your setup code here, to run once:
Serial2.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial2.println("KinCony");
delay(500);
}

the module does not work for sending via rs485 protocol. how is zero applied to the RE and DE pins MAX13487? there must be either a connection to the DI pin or control of a separate esp32 pin.
DE/RE not need to use, MAX13487 will auto control the signal direction. for ESP32 just use RXD,TXD pins is ok.
DE/RE pin just connect together with 10k resistance to Vcc is ok.
do you have define the Serial2 pin in your arduino config fle firstly?
[Image: attachment.php?aid=1924]
RS485:
RXD:GPIO16
TXD:GPIO14

just replace these pin number in your config file. Because I uploaded the image is KC868-A6's RS485 pin of ESP32.
(02-23-2023, 12:02 PM)admin Wrote: [ -> ]RS485:
RXD:GPIO16
TXD:GPIO14

just replace these pin number in your config file. Because I uploaded the image is KC868-A6's RS485 pin of ESP32.

Thank you. it works
ok, good.