09-15-2025, 01:35 AM
Code:
#define TUYA_RXD 15
#define TUYA_TXD 48
void setup() {
Serial0.begin(115200); // Serial0
while (!Serial0);
Serial2.begin(115200, SERIAL_8N1, TUYA_RXD, TUYA_TXD);
delay(100);
byte tuya_cmd[] = {0x55, 0xAA, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04};
Serial0.println("send data to Tuya module:");
for (int i = 0; i < sizeof(tuya_cmd); i++) {
Serial0.printf("%02X ", tuya_cmd[i]);
Serial2.write(tuya_cmd[i]);
}
Serial0.println();
}
void loop() {
if (Serial2.available()) {
Serial0.print("received from tuya: ");
while (Serial2.available()) {
byte b = Serial2.read();
Serial0.printf("%02X ", b);
}
Serial0.println();
}
delay(100);
}
9-Zigbee-ZSU.zip (Size: 496 bytes / Downloads: 174)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
9-Zigbee-ZSU.ino.merged.zip (Size: 190.24 KB / Downloads: 161)
YouTube: https://www.youtube.com/c/KinCony
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/
Online Store: https://shop.kincony.com
Alibaba Store: https://kincony.en.alibaba.com/

