Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,191
» Latest member: ykbett88com
» Forum threads: 4,264
» Forum posts: 21,145

Full Statistics

Online Users
There are currently 469 online users.
» 0 Member(s) | 446 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, PetalBot, Semrush, bot

Latest Threads
SSD not visible for insta...
Forum: Pi5R16
Last Post: Verresen
7 hours ago
» Replies: 10
» Views: 30
KC868-A16 and Tuya
Forum: KC868-A series and Uair Smart Controller
Last Post: newdos
Yesterday, 09:33 AM
» Replies: 8
» Views: 50
KC868-AI mDNS problem
Forum: KC868-AI
Last Post: admin
Yesterday, 07:53 AM
» Replies: 1
» Views: 8
remember relay state
Forum: KC868-E16T
Last Post: admin
Yesterday, 07:51 AM
» Replies: 9
» Views: 467
N30 (KCS): energy counter...
Forum: N30
Last Post: admin
10-09-2026, 11:12 PM
» Replies: 1
» Views: 18
Bricked KC868-A16
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
10-09-2026, 11:09 PM
» Replies: 7
» Views: 102
KinCony G1 ESP32-S3 SIM76...
Forum: News
Last Post: admin
10-09-2026, 11:09 PM
» Replies: 4
» Views: 1,618
Current direction detecti...
Forum: N30
Last Post: dominique_manas@hotmail.com
10-09-2026, 07:31 AM
» Replies: 4
» Views: 437
KC868-A8 on Heat Pump for...
Forum: KC868-HxB series Smart Controller
Last Post: marktuan
10-09-2026, 03:17 AM
» Replies: 2
» Views: 644
B32M maximum voltage
Forum: DIY Project
Last Post: felixandrea
10-09-2026, 03:14 AM
» Replies: 5
» Views: 633

  [arduino code examples for TA]-06 how to DS3231 RTC clock
Posted by: admin - 04-03-2025, 06:52 AM - Forum: TA - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* DS3231 RTC with Arduino
*
* This program demonstrates how to use the DS3231 RTC (Real-Time Clock) module with the Arduino.
* It includes functionality to:
* - Initialize the DS3231 RTC module
* - Read the current date and time from the RTC
* - Set the RTC time based on a serial command:Command format: DYYYY-MM-DDTHH:MM:SS
*    Set date and time command example: D2024-09-19T11:50:22
*    print current date and time command: current time
*
*
* Hardware Connections:
* - SDA: GPIO 8
* - SCL: GPIO 18
*/

#include <DS3231.h>
#include <Wire.h>

String serial_cmd_rcv = ""; // Serial port receiver

typedef struct
{
  byte year;    // Last two digits of the year, library adds 2000.
  byte month;
  byte day;
  byte hour;
  byte minute;
  byte second;
} MY_DATE_STR;

MY_DATE_STR my_date_str = {0};

// Define constants for relay control
#define OPEN_RLY_DATA    26
#define OPEN_RLY_MONTH   4
#define CLOSE_RLY_DATA   2
#define CLOSE_RLY_MONTH  5

// Define pin connections
#define SDA_PIN   8
#define SCL_PIN   18

DS3231 rtc; // Create an instance of the DS3231 RTC
bool h12Flag;
bool pmFlag;
static bool bCentury = false;
static bool old_level_high = false;
static bool old_level_low = false;


/**
* @brief Print the current time from the RTC to the Serial Monitor.
*/
static void PrintfCurTime()
{
  Serial.print("Current time is: ");
  int year = rtc.getYear() + 2000;
  Serial.print(year);
  Serial.print("-");

  Serial.print(rtc.getMonth(bCentury), DEC);
  Serial.print("-");

  Serial.print(rtc.getDate(), DEC);
  Serial.print(" ");

  Serial.print(rtc.getHour(h12Flag, pmFlag), DEC);
  Serial.print(":");
  Serial.print(rtc.getMinute(), DEC);
  Serial.print(":");
  Serial.println(rtc.getSecond(), DEC);
}

/**
* @brief Process serial commands to set the RTC time.
* Command format: DYYYY-MM-DDTHH:MM:SS
*/
static void GetSerialCmd()
{
  if (Serial.available() > 0)
  {
    delay(100);
    int num_read = Serial.available();
    while (num_read--)
      serial_cmd_rcv += char(Serial.read());
  }
  else return;

  serial_cmd_rcv.trim();

  if (serial_cmd_rcv == "current time")
  {
    PrintfCurTime();
    serial_cmd_rcv = "";
    return;
  }

  Serial.print("Received length: ");
  Serial.println(serial_cmd_rcv.length());

  int indexof_d = serial_cmd_rcv.indexOf('D');
  int indexof_t = serial_cmd_rcv.indexOf('T');

  Serial.print("D index: ");
  Serial.print(indexof_d);
  Serial.print(" T index: ");
  Serial.println(indexof_t);

  if (serial_cmd_rcv.length() != 20 ||
      serial_cmd_rcv.substring(0, 1) != "D" ||
      serial_cmd_rcv.substring(11, 12) != "T") 
  {
    Serial.println(serial_cmd_rcv);
    serial_cmd_rcv = "";
    return;
  }

  Serial.println("Setting time...");

  my_date_str.year = (byte)serial_cmd_rcv.substring(3, 5).toInt();
  my_date_str.month = (byte)serial_cmd_rcv.substring(6, 8).toInt();
  my_date_str.day = (byte)serial_cmd_rcv.substring(9, 11).toInt();
  my_date_str.hour = (byte)serial_cmd_rcv.substring(12, 14).toInt();
  my_date_str.minute = (byte)serial_cmd_rcv.substring(15, 17).toInt();
  my_date_str.second = (byte)serial_cmd_rcv.substring(18).toInt();

  rtc.setYear(my_date_str.year);
  rtc.setMonth(my_date_str.month);
  rtc.setDate(my_date_str.day);
  rtc.setHour(my_date_str.hour);
  rtc.setMinute(my_date_str.minute);
  rtc.setSecond(my_date_str.second);

  serial_cmd_rcv = "";

  Serial.println("Time set.");
}

void setup() {
  // Initialize the I2C interface
  Wire.begin(SDA_PIN, SCL_PIN, 40000);
 
  // Initialize Serial communication
  Serial.begin(115200);
   
  // Set the RTC to 24-hour mode
  rtc.setClockMode(false); // 24-hour format

  // Print current time to Serial Monitor
  PrintfCurTime();

  // Clear any remaining serial data
  while (Serial.read() >= 0) {}
}

void loop() {
  // Process incoming serial commands
  GetSerialCmd();
  delay(1000); // Delay for 1 second
}
arduino ino file download: 

.zip   6-DS3231-RTC.zip (Size: 1.56 KB / Downloads: 675)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   6-DS3231-RTC.ino.merged.zip (Size: 193.66 KB / Downloads: 742)

Print this item

  [arduino code examples for TA]-05 Read free GPIO state
Posted by: admin - 04-03-2025, 06:50 AM - Forum: TA - No Replies

Code:
/*
* ESP32 GPIO State Reader
* Reads the state of 12 GPIOs and prints the results to the serial monitor.
*
* Made by KinCony IoT: https://www.kincony.com
*/

#define GPIO_9   9
#define GPIO_11  11
#define GPIO_5   5
#define GPIO_4   4
#define GPIO_7   7
#define GPIO_6   6
#define GPIO_13  13
#define GPIO_40  40
#define GPIO_14  14
#define GPIO_48  48
#define GPIO_21  21
#define GPIO_47  47

void setup() {
    Serial.begin(115200); // Initialize serial communication at 115200 baud rate
   
    // Set GPIOs as input
    pinMode(GPIO_9, INPUT);
    pinMode(GPIO_11, INPUT);
    pinMode(GPIO_5, INPUT);
    pinMode(GPIO_4, INPUT);
    pinMode(GPIO_7, INPUT);
    pinMode(GPIO_6, INPUT);
    pinMode(GPIO_13, INPUT);
    pinMode(GPIO_40, INPUT);
    pinMode(GPIO_14, INPUT);
    pinMode(GPIO_48, INPUT);
    pinMode(GPIO_21, INPUT);
    pinMode(GPIO_47, INPUT);
}

void loop() {
    // Read GPIO states
    int state_9  = digitalRead(GPIO_9);
    int state_11 = digitalRead(GPIO_11);
    int state_5  = digitalRead(GPIO_5);
    int state_4  = digitalRead(GPIO_4);
    int state_7  = digitalRead(GPIO_7);
    int state_6  = digitalRead(GPIO_6);
    int state_13 = digitalRead(GPIO_13);
    int state_40 = digitalRead(GPIO_40);
    int state_14 = digitalRead(GPIO_14);
    int state_48 = digitalRead(GPIO_48);
    int state_21 = digitalRead(GPIO_21);
    int state_47 = digitalRead(GPIO_47);

    // Print GPIO states to the serial monitor
    Serial.printf("GPIO9: %d, GPIO11: %d, GPIO5: %d, GPIO4: %d, GPIO7: %d, GPIO6: %d, GPIO13: %d, GPIO40: %d, GPIO14: %d, GPIO48: %d, GPIO21: %d, GPIO47: %d\n",
                  state_9, state_11, state_5, state_4, state_7, state_6, state_13, state_40, state_14, state_48, state_21, state_47);
   
    delay(1000); // Read GPIO states every second
}
arduino ino file download: 

.zip   5-free-gpio-state.zip (Size: 737 bytes / Downloads: 750)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   5-free-gpio-state.ino.merged.zip (Size: 181.6 KB / Downloads: 764)

Print this item

  [arduino code examples for TA]-04 RS485 communication test
Posted by: admin - 04-03-2025, 06:45 AM - Forum: TA - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* RS485 Communication Test
*
* This program is a simple test for RS485 communication using ESP32-S3.
* It will send a message over RS485 and then read incoming messages.
* The TXD pin is defined as GPIO 18 and RXD pin is defined as GPIO 8.
*/

#include <HardwareSerial.h>

// Define RS485 pins
#define RS485_RXD 38
#define RS485_TXD 39

// Create a hardware serial object
HardwareSerial rs485Serial(1);

void setup() {
  // Start serial communication for debugging
  Serial.begin(115200);
  while (!Serial);

  // Initialize RS485 Serial communication
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);
 
  Serial.println("RS485 Test Start");
}

void loop() {
  // Send a test message
  rs485Serial.println("Hello from KinCony TA!");

  // Wait for a short period
  delay(1000);

  // Check if data is available to read
  if (rs485Serial.available()) {
    String receivedMessage = "";
    while (rs485Serial.available()) {
      char c = rs485Serial.read();
      receivedMessage += c;
    }
    // Print the received message
    Serial.print("Received: ");
    Serial.println(receivedMessage);
  }

  // Wait before sending the next message
  delay(2000);
}
arduino ino file download: 

.zip   4-RS485-Test.zip (Size: 762 bytes / Downloads: 704)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   4-RS485-Test.ino.merged.zip (Size: 186.54 KB / Downloads: 710)

Print this item

  [arduino code examples for TA]-03 RF433MHz signal decode
Posted by: admin - 04-03-2025, 06:43 AM - Forum: TA - No Replies

Code:
/*
  Simple example for receiving
 
  https://github.com/sui77/rc-switch/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(12));
  Serial.print("begin test");
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}
arduino ino file download:

.zip   3-433-decode.zip (Size: 455 bytes / Downloads: 734)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   3-433-decode.ino.merged.zip (Size: 183.33 KB / Downloads: 743)

Print this item

  [arduino code examples for TA]-02 Read digital input ports state
Posted by: admin - 04-03-2025, 06:39 AM - Forum: TA - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads the state of a 16-channel PCF8575 I/O expander
* and prints the state of all input pins to the Serial Monitor. The state of
* each pin is represented as a bit in a 16-bit value, where each bit corresponds
* to an input pin. The program prints the input state in binary format.
*
* Pin Definitions:
* - SDA: GPIO 8
* - SCL: GPIO 18
* - PCF8575 I2C Address: 0x22
*/

#include "Arduino.h"
#include "PCF8575.h"

// Define I2C pins
#define I2C_SDA 8  // Define SDA pin
#define I2C_SCL 18  // Define SCL pin

// Set I2C address
PCF8575 pcf8575_IN1(0x22); // The I2C address of the PCF8575

void setup() {
    Serial.begin(115200);

    // Initialize I2C communication
    Wire.begin(I2C_SDA, I2C_SCL); // Initialize I2C with defined SDA and SCL pins

    pcf8575_IN1.begin(); // Initialize the PCF8575

    Serial.println("KinCony TA 12 channel input state 0:ON  1:OFF");
}

void loop() {
    uint16_t state = 0;

    // Read the state of each pin (assuming 16 pins)
    for (int pin = 0; pin < 12; pin++) {
        if (pcf8575_IN1.read(pin)) {
            state |= (1 << pin); // Set the bit for the active pin
        }
    }

    Serial.print("Input state: ");
    Serial.println(state, BIN); // Print the state of inputs in binary

    delay(500); // Delay 500ms
}
arduino ino file download:

.zip   2-digital-input.zip (Size: 837 bytes / Downloads: 693)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   2-digital-input.ino.merged.zip (Size: 192.29 KB / Downloads: 732)

Print this item

  [arduino code examples for TA]-01 Turn ON/OFF relay
Posted by: admin - 04-03-2025, 06:36 AM - Forum: TA - No Replies

Code:
// Made by KinCony IoT: https://www.kincony.com

#include <Wire.h>        // Include I2C communication library
#include <PCF8575.h>     // Include PCF8575 library

#define SDA_PIN 8        // I2C SDA pin
#define SCL_PIN 18       // I2C SCL pin

#define RELAY1 14        // Relay 1 (PCF8575 CH15)
#define RELAY2 15       // Relay 2 (PCF8575 CH16)

#define I2C_ADDRESS 0x22 // I2C address of PCF8575

PCF8575 pcf8575(I2C_ADDRESS); // Create PCF8575 object

void setup() {
    Wire.begin(SDA_PIN, SCL_PIN); // Initialize I2C bus
    Serial.begin(115200);
    Serial.println("PCF8575 Relay Control: Starting...");

    pcf8575.begin(); // Initialize PCF8575

    // Initialize relay state, default OFF (HIGH)
    pcf8575.write(RELAY1, HIGH);
    pcf8575.write(RELAY2, HIGH);
    Serial.println("All relays are OFF");
}

void loop() {
    Serial.println("Turning Relay 1 ON");
    pcf8575.write(RELAY1, LOW); // Turn ON relay 1
    delay(2000);
    Serial.println("Turning Relay 1 OFF");
    pcf8575.write(RELAY1, HIGH); // Turn OFF relay 1
    delay(2000);

    Serial.println("Turning Relay 2 ON");
    pcf8575.write(RELAY2, LOW); // Turn ON relay 2
    delay(2000);
    Serial.println("Turning Relay 2 OFF");
    pcf8575.write(RELAY2, HIGH); // Turn OFF relay 2
    delay(2000);
}
arduino ino file download:

.zip   1-output.zip (Size: 631 bytes / Downloads: 727)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   1-output.ino.merged.zip (Size: 192.13 KB / Downloads: 728)

Print this item

  TA ESPHome yaml for home assistant
Posted by: admin - 04-03-2025, 06:33 AM - Forum: TA - No Replies

Code:
esphome:
  name: ta
  friendly_name: TA
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=1"
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-wifi-mcu
      ref: v1.1.0

# Enable logging
#logger:
#  level: DEBUG
#   hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:
  encryption:
    key: "WeVOuL5oNhjXcfzXtTirlOwvtWvCD5yqIxd3oV4es1k="

# ethernet:
#   type: W5500
#   clk_pin: GPIO1
#   mosi_pin: GPIO2
#   miso_pin: GPIO41
#   cs_pin: GPIO42
#   interrupt_pin: GPIO43
#   reset_pin: GPIO44

wifi:
  ssid: KinCony
  password: 'a12345678'

i2c:
   - id: bus_a
     sda: 8
     scl: 18
     scan: true
     frequency: 400kHz

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16
    i2c_id: bus_a
    address: 0x22
    pcf8575: true

uart:
  - id: uart_1    #RS485
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 39
    rx_pin: 38

  - id: tuya_mcu_uart
    tx_pin: GPIO16
    rx_pin: GPIO17
    baud_rate: 9600

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: asowcylz7am5cbtp
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 28
  wifi_led_pin: 16

switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "ta-output01"
    id: "ta_output01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-output1-tuya
    dp_id: 1
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "ta_output01"

  - platform: gpio
    name: "ta-output02"
    id: "ta_output02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-output2-tuya
    dp_id: 2
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "ta_output02"


binary_sensor:
  - platform: gpio
    name: "ta-input01"
    id: "ta_input01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input1-tuya
    dp_id: 111
    bind_binary_sensor_id: ta_input01
    internal: true

  - platform: gpio
    name: "ta-input02"
    id: "ta_input02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input2-tuya
    dp_id: 112
    bind_binary_sensor_id: ta_input02
    internal: true

  - platform: gpio
    name: "ta-input03"
    id: "ta_input03"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input3-tuya
    dp_id: 113
    bind_binary_sensor_id: ta_input03
    internal: true

  - platform: gpio
    name: "ta-input04"
    id: "ta_input04"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input4-tuya
    dp_id: 114
    bind_binary_sensor_id: ta_input04
    internal: true

  - platform: gpio
    name: "ta-input05"
    id: "ta_input05"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input5-tuya
    dp_id: 115
    bind_binary_sensor_id: ta_input05
    internal: true

  - platform: gpio
    name: "ta-input06"
    id: "ta_input06"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input6-tuya
    dp_id: 116
    bind_binary_sensor_id: ta_input06
    internal: true

  - platform: gpio
    name: "ta-input07"
    id: "ta_input07"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input7-tuya
    dp_id: 117
    bind_binary_sensor_id: ta_input07
    internal: true

  - platform: gpio
    name: "ta-input08"
    id: "ta_input08"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input8-tuya
    dp_id: 118
    bind_binary_sensor_id: ta_input08
    internal: true

  - platform: gpio
    name: "ta-input09"
    id: "ta_input09"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 8
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input9-tuya
    dp_id: 119
    bind_binary_sensor_id: ta_input09
    internal: true

  - platform: gpio
    name: "ta-input10"
    id: "ta_input10"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 9
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input10-tuya
    dp_id: 120
    bind_binary_sensor_id: ta_input10
    internal: true

  - platform: gpio
    name: "ta-input11"
    id: "ta_input11"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 10
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input11-tuya
    dp_id: 121
    bind_binary_sensor_id: ta_input11
    internal: true

  - platform: gpio
    name: "ta-input12"
    id: "ta_input12"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 11
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: ta-input12-tuya
    dp_id: 122
    bind_binary_sensor_id: ta_input12
    internal: true


##pull-up resistance on PCB
  - platform: gpio
    name: "ta-io09"
    pin:
      number: 9
      inverted: true

  - platform: gpio
    name: "ta-io11"
    pin:
      number: 11
      inverted: true

  - platform: gpio
    name: "ta-io05"
    pin:
      number: 5
      inverted: true

  - platform: gpio
    name: "ta-io04"
    pin:
      number: 4
      inverted: true

  - platform: gpio
    name: "ta-io07"
    pin:
      number: 7
      inverted: false

  - platform: gpio
    name: "ta-io06"
    pin:
      number: 6
      inverted:  false

  - platform: gpio
    name: "ta-io13"
    pin:
      number: 13
      inverted:  false

  - platform: gpio
    name: "ta-io40"
    pin:
      number: 40
      inverted:  false

  - platform: gpio
    name: "ta-io14"
    pin:
      number: 14
      inverted:  false

  - platform: gpio
    name: "ta-io48"
    pin:
      number: 48
      inverted:  false

  - platform: gpio
    name: "ta-io21"
    pin:
      number: 21
      inverted:  false

  - platform: gpio
    name: "ta-io47"
    pin:
      number: 47
      inverted:  false

  - platform: gpio
    name: "ta-io0"
    pin:
      number: 0
      inverted:  false

  - platform: gpio
    name: "ta-433M-R"
    pin:
      number: 12
      inverted:  false

web_server:
  port: 80

Print this item

  TA ESP32-S3 IO pins define
Posted by: admin - 04-03-2025, 06:33 AM - Forum: TA - No Replies

SDA:GPIO8
SCL:GPIO18

PCF8575:i2c address:0x22
digital input: CH1-12
relay output: CH15,CH16


24C02 EPROM i2c address: 0x50
DS3231 RTC i2c address: 0x68

1-wire (pull-up resistance on PCB):
1-wire1:GPIO9
1-wire2:GPIO11
1-wire3:GPIO5
1-wire4:GPIO4
1-wire5:GPIO7
1-wire6:GPIO6
1-wire7:GPIO13
1-wire8:GPIO40
1-wire9:GPIO14
1-wire10:GPIO48
1-wire11:GPIO21
1-wire12:GPIO47

-----------------------
Ethernet (W5500) I/O define:

clk_pin: GPIO1
mosi_pin: GPIO2
miso_pin: GPIO41
cs_pin: GPIO42

interrupt_pin: GPIO43
reset_pin: GPIO44

--------------------
RS485:
RXD:GPIO38
TXD:GPIO39

Tuya module:
RXD:GPIO17
TXD:GPIO16

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16

RF433M receiver: GPIO12

Print this item

  KC868-A16 rev.1.6 update problem
Posted by: simpl3x - 04-02-2025, 10:01 AM - Forum: "KCS" v2 firmware system - Replies (4)

hi. try to update new device KC868-A16
   

but have error after 15 sec from start
   

Code:
test offset :  0 0x0
case ok
.
Uploading stub...
Running stub...
Stub running...
FLASH_CRYPT_CNT 0
ABS_DONE_0 False
Compressed 2081424 bytes to 792650...
[2025-04-02 12:57:04,480][ESP8266Loader_spi[1]][espDownloader.py][line:606][ERROR]: ESP32 Chip flash download error esp_write_flash.

Print this item

  KC868-A4 - DHT 22
Posted by: ariffakil - 04-02-2025, 09:01 AM - Forum: KC868-A4 - Replies (7)

Dear sir  ., 

i like to know  to   which in i hvae to Connect DHT 22  or 11  in KC-868 -A4 1.2.5   borad , i used  pin 13  but  its cant able to reade

Print this item