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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,394
» Latest member: shehnaazkhan
» Forum threads: 3,654
» Forum posts: 18,900

Full Statistics

Online Users
There are currently 46 online users.
» 0 Member(s) | 25 Guest(s)
AhrefsBot, Amazonbot, Applebot, Bing, Bytespider, Crawl, Google, PetalBot, bot, github.com

Latest Threads
flash Kincony software to...
Forum: DIY Project
Last Post: guycaluwaerts
2 hours ago
» Replies: 5
» Views: 33
KC868-M16v2 configure yam...
Forum: KC868-M16 / M1 / MB / M30
Last Post: cmeyer5
4 hours ago
» Replies: 142
» Views: 26,075
N30 Energy entry not work...
Forum: N30
Last Post: Vega
9 hours ago
» Replies: 24
» Views: 412
Connect um330 and kc828 a...
Forum: DIY Project
Last Post: gtd0916
Today, 04:37 AM
» Replies: 30
» Views: 3,450
KC868-HAv2 work with F24 ...
Forum: KC868-HA /HA v2
Last Post: admin
Today, 01:03 AM
» Replies: 7
» Views: 664
KC868-A8 Relay Delay
Forum: KC868-A8
Last Post: admin
Today, 12:58 AM
» Replies: 1
» Views: 17
T16M not responding on US...
Forum: T16M
Last Post: robarends
Yesterday, 12:55 PM
» Replies: 4
» Views: 32
Initial configuration for...
Forum: KC868-A16v3
Last Post: admin
Yesterday, 12:40 PM
» Replies: 22
» Views: 3,189
Problema a cargar .bin al...
Forum: KC868-A2
Last Post: admin
Yesterday, 12:16 AM
» Replies: 3
» Views: 33
"SmartLife" wifi transmit
Forum: TA
Last Post: admin
01-07-2026, 12:17 AM
» Replies: 7
» Views: 63

  A24 arduino demo source code-06- Ethernet LAN8720 by UDP
Posted by: KinCony Support - 12-07-2023, 02:39 AM - Forum: KinCony A24 - No Replies

Code:
#include <ETH.h>
#include <WiFiUdp.h>

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN   18  
#define ETH_TYPE       ETH_PHY_LAN8720
#define ETH_CLK_MODE   ETH_CLOCK_GPIO17_OUT

WiFiUDP Udp;                      //Create UDP object
unsigned int localUdpPort = 4196; //local port

// Set it based on the IP address of the router
IPAddress local_ip(192, 168, 1, 200);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 1, 1);

void setup()
{
  Serial.begin(115200);
  Serial.println();
  
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH

  // write confir for static IP, gateway,subnet,dns1,dns2
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
    Serial.println("LAN8720 Configuration failed.");
  }else{Serial.println("LAN8720 Configuration success.");}
  Serial.println("Connected");
  Serial.print("IP Address:");
  Serial.println(ETH.localIP());

  Udp.begin(localUdpPort); //begin UDP listener
}

void loop()
{
  int packetSize = Udp.parsePacket(); //get package size
  if (packetSize)                     //if have received data
  {
    char buf[packetSize];
    Udp.read(buf, packetSize); //read current data

    Serial.println();
    Serial.print("Received: ");
    Serial.println(buf);
    Serial.print("From IP: ");
    Serial.println(Udp.remoteIP());
    Serial.print("From Port: ");
    Serial.println(Udp.remotePort());

    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data
    Udp.print("Received: ");   
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer
    Udp.endPacket();            //send data
  }
}
   

Print this item

  A24 arduino demo source code-05-read DS18B20 temperature sensor
Posted by: KinCony Support - 12-07-2023, 02:32 AM - Forum: KinCony A24 - No Replies

Code:
#include <DS18B20.h>
DS18B20 ds1(15);  //channel-1-DS18b20


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

void loop()
{
  Serial.print("Temperature1:");
  Serial.print(ds1.getTempC());
  Serial.print(" C /");
  delay(500);  
}
       

Print this item

  A24 arduino demo source code-04-read K-type thermocouple by MAX31855
Posted by: KinCony Support - 12-07-2023, 02:24 AM - Forum: KinCony A24 - No Replies

Code:
#include <my_max31855.h>
#include <arduino.h>
#include <EasyPCF8575.h>
#include "HardwareSerial.h"

EasyPCF8575 pcf8575_dev;
HardwareSerial my485Serial(2);
MY_MAX31855_Class mx31855_dev1;
MY_MAX31855_Class mx31855_dev2;
MY_MAX31855_Class mx31855_dev3;

int32_t result_value1 = 0;
int32_t result_value2 = 0;
int32_t result_value3 = 0;
void setup() {
 
  my485Serial.begin(38400,SERIAL_8N1,32,33);
  while(my485Serial.read()>0){}

  pcf8575_dev.startI2C(16,5,0x21);
 
  my485Serial.print("try Find8575:addr is ");
  my485Serial.print(pcf8575_dev.findPCFaddr(),HEX);

  mx31855_dev1.begin(1,12,14,false);  //1 is CH1
  mx31855_dev2.begin(2,12,14,false);  //2 is CH2
  mx31855_dev3.begin(3,12,14,false);  //3 is CH3

}

void loop() {
result_value1 = mx31855_dev1.readProbe();
result_value2 = mx31855_dev2.readProbe();
result_value3 = mx31855_dev3.readProbe();
my485Serial.printf("current1 temp:%d C||current2 temp:%d C||current3 temp:%d C\n",result_value1/1000,result_value2/1000,result_value3/1000);
delay(1000);
}
Install  easypcf8575  library
   
Unzip max31855.zip file and copy the file to arduino librarys 

.zip   MAX31855.zip (Size: 4.54 KB / Downloads: 448)
   

Print this item

  A24 arduino demo source code-03-anlog input (ADC)
Posted by: KinCony Support - 12-07-2023, 02:07 AM - Forum: KinCony A24 - No Replies

Code:
#include "Arduino.h"

#define ANALOG_A1   35       
#define ANALOG_A2   34         
#define ANALOG_A3   39        
#define ANALOG_A4   36        
void setup()
{
Serial.begin(115200);
delay(1000);

  pinMode(ANALOG_A1,INPUT);
  pinMode(ANALOG_A2,INPUT);
  pinMode(ANALOG_A3,INPUT);
  pinMode(ANALOG_A4,INPUT);
}

void loop()
{
  if(analogRead(ANALOG_A1)!=0)
    {  Serial.printf("Current Reading A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));delay(500);}
  if(analogRead(ANALOG_A2)!=0)
    {  Serial.printf("Current Reading A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));delay(500);}
  if(analogRead(ANALOG_A3)!=0)
    {  Serial.printf("Current Reading A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));delay(500);}
  if(analogRead(ANALOG_A4)!=0)
    {  Serial.printf("Current Reading A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));delay(500);}

}

   

Print this item

  A24 arduino demo source code-02-digital input
Posted by: KinCony Support - 12-07-2023, 02:00 AM - Forum: KinCony A24 - No Replies

Code:
#include "Arduino.h"
#include "PCF8575.h"
#define delaytime    200
PCF8575 pcf8575_IN1(0x24,16,5);
PCF8575 pcf8575_IN2(0x25,16,5);
void setup()
{
  Serial.begin(115200);
  delay(100);
/**************************************************************/ 
pcf8575_IN1.begin();
pcf8575_IN2.begin();
  for (int a=0;a<=15;a++)
    {
      pcf8575_IN1.pinMode(a,INPUT);
     
    }
     for (int a=0;a<=7;a++)
    {
     pcf8575_IN2.pinMode(a,INPUT);
    }
/*************************************/
}
void loop()
{
  delay(delaytime);
  for(int a=0;a<=15;a++){
     if (pcf8575_IN1.digitalRead(a)==0) Serial.printf(("KEY %d PRESSED\n"),a+1);
  }
  for(int a=0;a<=7;a++){
     if (pcf8575_IN2.digitalRead(a)==0) Serial.printf(("KEY %d PRESSED\n"),a+17);
  }
 
}

   

Print this item

  A24 arduino demo source code-01-relay output
Posted by: KinCony Support - 12-07-2023, 01:52 AM - Forum: KinCony A24 - No Replies

Code:
#include "Arduino.h"
#include "PCF8575.h"
// Set i2c address
PCF8575 pcf8575_R1(0x21,16,5);
PCF8575 pcf8575_R2(0x22,16,5);
unsigned long timeElapsed;
void setup()
{
  Serial.begin(115200);
  Serial.println(__FILE__);
pcf8575_R1.pinMode(P0,OUTPUT);
pcf8575_R1.pinMode(P1,OUTPUT);
pcf8575_R1.pinMode(P2,OUTPUT);
pcf8575_R1.pinMode(P3,OUTPUT);
pcf8575_R1.pinMode(P4,OUTPUT);
pcf8575_R1.pinMode(P5,OUTPUT);
pcf8575_R1.pinMode(P6,OUTPUT);
pcf8575_R1.pinMode(P7,OUTPUT);
pcf8575_R1.pinMode(P8,OUTPUT);
pcf8575_R1.pinMode(P9,OUTPUT);
pcf8575_R1.pinMode(P10,OUTPUT);
pcf8575_R1.pinMode(P11,OUTPUT);
pcf8575_R2.pinMode(P0,OUTPUT);
pcf8575_R2.pinMode(P1,OUTPUT);
pcf8575_R2.pinMode(P2,OUTPUT);
pcf8575_R2.pinMode(P3,OUTPUT);
pcf8575_R2.pinMode(P4,OUTPUT);
pcf8575_R2.pinMode(P5,OUTPUT);
pcf8575_R2.pinMode(P6,OUTPUT);
pcf8575_R2.pinMode(P7,OUTPUT);
pcf8575_R2.pinMode(P8,OUTPUT);
pcf8575_R2.pinMode(P9,OUTPUT);
pcf8575_R2.pinMode(P10,OUTPUT);
pcf8575_R2.pinMode(P11,OUTPUT);
  pcf8575_R1.begin();
  pcf8575_R2.begin();
}
void loop()
{
pcf8575_R1.digitalWrite(P0,HIGH);delay(500);
pcf8575_R1.digitalWrite(P1,HIGH);delay(500);
pcf8575_R1.digitalWrite(P2,HIGH);delay(500);
pcf8575_R1.digitalWrite(P3,HIGH);delay(500);
pcf8575_R1.digitalWrite(P4,HIGH);delay(500);
pcf8575_R1.digitalWrite(P5,HIGH);delay(500);
pcf8575_R1.digitalWrite(P6,HIGH);delay(500);
pcf8575_R1.digitalWrite(P7,HIGH);delay(500);
pcf8575_R1.digitalWrite(P8,HIGH);delay(500);
pcf8575_R1.digitalWrite(P9,HIGH);delay(500);
pcf8575_R1.digitalWrite(P10,HIGH);delay(500);
pcf8575_R1.digitalWrite(P11,HIGH);delay(500);
pcf8575_R2.digitalWrite(P0,HIGH);delay(500);
pcf8575_R2.digitalWrite(P1,HIGH);delay(500);
pcf8575_R2.digitalWrite(P2,HIGH);delay(500);
pcf8575_R2.digitalWrite(P3,HIGH);delay(500);
pcf8575_R2.digitalWrite(P4,HIGH);delay(500);
pcf8575_R2.digitalWrite(P5,HIGH);delay(500);
pcf8575_R2.digitalWrite(P6,HIGH);delay(500);
pcf8575_R2.digitalWrite(P7,HIGH);delay(500);
pcf8575_R2.digitalWrite(P8,HIGH);delay(500);
pcf8575_R2.digitalWrite(P9,HIGH);delay(500);
pcf8575_R2.digitalWrite(P10,HIGH);delay(500);
pcf8575_R2.digitalWrite(P11,HIGH);delay(500);
pcf8575_R1.digitalWrite(P0,LOW);delay(500);
pcf8575_R1.digitalWrite(P1,LOW);delay(500);
pcf8575_R1.digitalWrite(P2,LOW);delay(500);
pcf8575_R1.digitalWrite(P3,LOW);delay(500);
pcf8575_R1.digitalWrite(P4,LOW);delay(500);
pcf8575_R1.digitalWrite(P5,LOW);delay(500);
pcf8575_R1.digitalWrite(P6,LOW);delay(500);
pcf8575_R1.digitalWrite(P7,LOW);delay(500);
pcf8575_R1.digitalWrite(P8,LOW);delay(500);
pcf8575_R1.digitalWrite(P9,LOW);delay(500);
pcf8575_R1.digitalWrite(P10,LOW);delay(500);
pcf8575_R1.digitalWrite(P11,LOW);delay(500);
pcf8575_R2.digitalWrite(P0,LOW);delay(500);
pcf8575_R2.digitalWrite(P1,LOW);delay(500);
pcf8575_R2.digitalWrite(P2,LOW);delay(500);
pcf8575_R2.digitalWrite(P3,LOW);delay(500);
pcf8575_R2.digitalWrite(P4,LOW);delay(500);
pcf8575_R2.digitalWrite(P5,LOW);delay(500);
pcf8575_R2.digitalWrite(P6,LOW);delay(500);
pcf8575_R2.digitalWrite(P7,LOW);delay(500);
pcf8575_R2.digitalWrite(P8,LOW);delay(500);
pcf8575_R2.digitalWrite(P9,LOW);delay(500);
pcf8575_R2.digitalWrite(P10,LOW);delay(500);
pcf8575_R2.digitalWrite(P11,LOW);delay(500);
}


   

Print this item

  "KCS" v2.2.2 firmware BIN file download
Posted by: admin - 12-07-2023, 01:31 AM - Forum: "KCS" v2 firmware system - Replies (73)

Here is "KCS" firmware for KinCony KC868-A series (ESP32) board.
How to download and use, online guide: https://www.kincony.com/esp32-kcsv2-firmware.html

v2.2.2 improment:
1. fixed bug can't show negative temperature with DS18B20



Attached Files
.zip   KCS_KC868_A8M_V2.2.2.zip (Size: 796.94 KB / Downloads: 864)
.zip   KCS_KC868_A8S_V2.2.2.zip (Size: 798.07 KB / Downloads: 706)
.zip   KCS_KC868_A16_V2.2.2.zip (Size: 787.79 KB / Downloads: 1548)
.zip   KCS_KC868_A16S_V2.2.2.zip (Size: 798.17 KB / Downloads: 750)
.zip   KCS_KC868_A4S_V2.2.2.zip (Size: 797.08 KB / Downloads: 648)
.zip   KCS_KC868_A4_V2.2.2.zip (Size: 776.82 KB / Downloads: 935)
.zip   KCS_KC868_UAIR_V2.2.2.zip (Size: 763.55 KB / Downloads: 633)
.zip   KCS_KC868_A2_V2.2.2.zip (Size: 786.48 KB / Downloads: 647)
.zip   KCS_KC868_AG_V2.2.2.zip (Size: 760.46 KB / Downloads: 705)
.zip   KCS_KC868_AI_V2.2.2.zip (Size: 784.33 KB / Downloads: 649)
.zip   KCS_KC868_AIO_V2.2.2.zip (Size: 797.63 KB / Downloads: 568)
.zip   KCS_KC868_AK_V2.2.2.zip (Size: 762.76 KB / Downloads: 574)
.zip   KCS_KC868_AM_V2.2.2.zip (Size: 773.67 KB / Downloads: 625)
.zip   KCS_KC868_AP_V2.2.2.zip (Size: 779.5 KB / Downloads: 516)
.zip   KCS_KC868_ASR_V2.2.2.zip (Size: 751.31 KB / Downloads: 536)
.zip   KCS_KC868_E16S_V2.2.2.zip (Size: 785.8 KB / Downloads: 590)
.zip   KCS_KC868_A32M_V2.2.2.zip (Size: 799.77 KB / Downloads: 639)
.zip   KCS_KC868_A64_V2.2.2.zip (Size: 781.64 KB / Downloads: 593)
.zip   KCS_KC868_A128_V2.2.2.zip (Size: 781.35 KB / Downloads: 479)
.zip   KCS_KC868_A8_V2.2.2.zip (Size: 780.49 KB / Downloads: 1056)
.zip   KCS_KC868_A6_V2.2.2.zip (Size: 772.55 KB / Downloads: 809)
.zip   KCS_KC868_A32_V2.2.2.zip (Size: 781.38 KB / Downloads: 580)
.zip   KCS_A24_V2.2.2.zip (Size: 747.66 KB / Downloads: 456)
Print this item

  KC868_AG with Tuya license
Posted by: Sameh - 12-06-2023, 09:26 PM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (1)

Does the Tuya license allow me to control IR devices?

Print this item

  Zigbee Switch work with "KCS" v2.1.9 firmware
Posted by: ayeosq - 12-06-2023, 02:46 AM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (1)

Is it possible to get a zigbee switch to work with AG PRO that has the  "KCS" v2.1.9 firmware 

Print this item

  KC868 A16 outputs not working on ESPhome
Posted by: homeassistant144 - 12-05-2023, 12:13 PM - Forum: KC868-A16 - Replies (15)

I am currently using KC868 A16 board with esphome in my homeasssistant. Flashing the board was succesful. I used the yaml code as shown here: https://www.kincony.com/forum/showthread.php?tid=1628 
Outputs from 1 to 16 all are shown in homeassistant dashboard. I am able to even turn on and off from the HA dashboard but nothing changes in the A16 board. Only the output 9 and 10 works. Rest of the outputs show no changes. I have attached my yaml code in .txt file below.

.txt   A16.txt (Size: 5.55 KB / Downloads: 462)
thank you

Print this item