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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,369
» Latest member: talljane
» Forum threads: 2,574
» Forum posts: 13,305

Full Statistics

Online Users
There are currently 42 online users.
» 0 Member(s) | 29 Guest(s)
Bing, Bytespider, Crawl, Google, PetalBot, Yandex, bot

Latest Threads
KC868-A2 ESP32 I/O pin de...
Forum: KC868-A2
Last Post: tugra
7 hours ago
» Replies: 7
» Views: 2,264
change wake up name
Forum: KinCony AS
Last Post: gal
Today, 07:36 AM
» Replies: 12
» Views: 79
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: xarouli5
Today, 06:38 AM
» Replies: 17
» Views: 181
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
Today, 04:32 AM
» Replies: 32
» Views: 393
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
Yesterday, 11:43 PM
» Replies: 10
» Views: 66
KC868-A8 Schematic
Forum: KC868-A8
Last Post: admin
Yesterday, 11:40 PM
» Replies: 7
» Views: 49
"KCS" v2.2.8 firmware BIN...
Forum: "KCS" firmware system
Last Post: admin
Yesterday, 11:38 PM
» Replies: 2
» Views: 175
Dimensions/drawings of bo...
Forum: Schematic and diagram
Last Post: admin
Yesterday, 11:37 PM
» Replies: 1
» Views: 23
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: admin
12-16-2024, 10:55 PM
» Replies: 12
» Views: 449
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: admin
12-16-2024, 10:53 PM
» Replies: 5
» Views: 37

Wink 【Sensor series program】-#02-Arduino code of KC868-A6 and Laser Sensor
Posted by: KinCony Support - 05-20-2022, 09:03 AM - Forum: KC868-A6 - No Replies

【Sensor series program】-#02-Arduino code of KC868-A6 and Laser Sensor

Code:
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  15, 4, U8X8_PIN_NONE);//SCL IO15  SDA  IO4


void page1() {
  u8g2.setFont(u8g2_font_timR14_tf);// Font 18
  u8g2.setFontPosTop();
  u8g2.setCursor(5,20);
  u8g2.print("Sending Lasers ");
}
void page2() {
  u8g2.setFont(u8g2_font_timR14_tf);// Font 18
  u8g2.setFontPosTop();
  u8g2.setCursor(5,20);
  u8g2.print("Not Sending");
}

void setup() {
  pinMode(0,INPUT);
  pinMode(32,OUTPUT);
  u8g2.setI2CAddress(0x3C*2);
  u8g2.begin();
  u8g2.enableUTF8Print();
 
}
void loop() {
  if(digitalRead(0)==LOW)
  {
   digitalWrite(32,HIGH);
   u8g2.firstPage();
    do
     {
    page1();
     }while(u8g2.nextPage());
  }
  else
     {
      digitalWrite(32,LOW);
         u8g2.firstPage();
    do
     {
       page2();
     }while(u8g2.nextPage());
     }
 
}
       

Print this item

Wink 【Sensor series program】-#01-Arduino code of KC868-A6 and Hall Sensor
Posted by: KinCony Support - 05-20-2022, 03:11 AM - Forum: KC868-A6 - No Replies

【Sensor series program】-#01-Arduino code of KC868-A6 and Hall Sensor

Code:
/*【Sensor series program】Arduino code of KC868-A6 and Hall Sensor*/
/*When the Hall sensor is triggered, Turn on relay 1; Otherwise turn off relay1*/
#include "Wire.h"
#include"PCF8574.h"

PCF8574 pcf8574_RE(0x24,4,15);
int rawValue;

void setup(){

  pinMode(32,INPUT);
  Serial.begin(115200);
  pcf8574_RE.pinMode(P0,OUTPUT);
  pcf8574_RE.pinMode(P1,OUTPUT);
  pcf8574_RE.pinMode(P2,OUTPUT);
  pcf8574_RE.pinMode(P3,OUTPUT);
  pcf8574_RE.pinMode(P4,OUTPUT);
  pcf8574_RE.pinMode(P5,OUTPUT);
  pcf8574_RE.begin();
  for(int i=0;i<6;i++)
  {
   pcf8574_RE.digitalWrite(i,HIGH);
  }
}

void loop(){
  rawValue=analogRead(32);
  Serial.println(rawValue);
  if(rawValue==0)
  {
     
      pcf8574_RE.digitalWrite(P0,LOW);
  }
  else {
      pcf8574_RE.digitalWrite(P0,HIGH);
  }
}
 
   

Print this item

  KC868 H32B in node red and home assistant
Posted by: ahmedwizza - 05-19-2022, 11:52 AM - Forum: KC868-HxB series Smart Controller - Replies (1)

Hello Engineer 

I faced some problem.when I active Alexa bridge and made switch .then connect Alexa node to controller by TCP out 
  all okay .... the sound control by Alexa is okay ...the switch appeared in Alexa app in my phone ...but I cant find the switch in Alexa entities in home assistant to control

as attached photos



Attached Files Thumbnail(s)
           
Print this item

Rainbow How to use tasmota for KC868-A32 via PCF8574 IIC extend GPIO
Posted by: KinCony Support - 05-18-2022, 02:50 AM - Forum: KC868-A32/A32 Pro - Replies (10)

How to use tasmota for KC868-A32 via PCF8574 IIC extend GPIO

   
The Tamplate code is:

{"NAME":"KC868-A32","GPIO":[32,0,1120,0,641,609,0,0,0,608,1,640,0,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1],"FLAG":0,"BASE":1}
   

Set all Device port to  "OUTPUT"
   

   



Attached Files
.zip   ESP-Flasher-Windows-x64.zip (Size: 16.07 MB / Downloads: 353)
.zip   firmware-en-a32.zip (Size: 764.89 KB / Downloads: 330)
Print this item

  Lesson24 - home assistant remote access by FREE DuckDNS
Posted by: admin - 05-17-2022, 04:27 AM - Forum: Home automation training courses - Replies (5)


https://www.duckdns.org/

Print this item

Thumbs Up [Arduino IDE demo source code for KC868-E16S]--#06-KC868-E16S-RS485
Posted by: KinCony Support - 05-17-2022, 01:29 AM - Forum: KC868-E16S/E16P - No Replies

[Arduino IDE demo source code for KC868-E16S]--#06-KC868-E16S-RS485
   

Code:
/*WWW.KINCONY.COM */
/*KC868-E16S CODE OF RS485*/
void setup(){
  Serial2.begin(9600,SERIAL_8N1,13,32);// IO13 is 485RX  IO32 is 485TX
}

void loop() {
Serial2.println("abcd123456789551");// send abcd123456789551
}



Attached Files
.zip   KC868-E16S-RS485.zip (Size: 469.31 KB / Downloads: 256)
Print this item

Thumbs Up [Arduino IDE demo source code for KC868-E16S]--#05-KC868-E16S-LAN8720_UDP
Posted by: KinCony Support - 05-17-2022, 01:28 AM - Forum: KC868-E16S/E16P - No Replies

[Arduino IDE demo source code for KC868-E16S]--#05-KC868-E16S-LAN8720_UDP
   

Code:
/*www.kincony.com */
/* KC868-E16S CODE OF LAN8720-UDP */
#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
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
  }
}
   



Attached Files
.zip   KC868-E16S-LAN8720_UDP.zip (Size: 1.11 KB / Downloads: 265)
Print this item

Thumbs Up [Arduino IDE demo source code for KC868-E16S]--#04-KC868-E16S-ADC_IN
Posted by: KinCony Support - 05-17-2022, 01:25 AM - Forum: KC868-E16S/E16P - No Replies

[Arduino IDE demo source code for KC868-E16S]--#04-KC868-E16S-ADC_IN
   

Code:
/*www.kinocny.com */
/*KC868-E16S CODE OF ADC-IN*/

#include "Arduino.h"

#define ANALOG_A1   36
#define ANALOG_A2   35
#define ANALOG_A3   34
#define ANALOG_A4   39

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

  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));}
  if(analogRead(ANALOG_A2)!=0)  {Serial.printf("Current Reading A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));}
  if(analogRead(ANALOG_A3)!=0)  {Serial.printf("Current Reading A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));}
  if(analogRead(ANALOG_A4)!=0)  {Serial.printf("Current Reading A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));}
  delay(50);
}



Attached Files
.zip   KC868-E16S-ADC_IN.zip (Size: 674 bytes / Downloads: 234)
Print this item

Thumbs Up [Arduino IDE demo source code for KC868-E16S]--#03-KC868-E16S-8574-DO
Posted by: KinCony Support - 05-17-2022, 01:21 AM - Forum: KC868-E16S/E16P - No Replies

[Arduino IDE demo source code for KC868-E16S]--#03-KC868-E16S-8574-DO
   

Code:
/*KC868-E16S Code of PCF8574 OUTPUT  CONTROL RELAYS*/
/*Press and hold on key Download ,relays ON,   release key relays OFF*/
#include "Arduino.h"
#include "PCF8574.h"

/*Set pcf8574 Output i2c address and SDA IO16/ SCL IO15*/
#define buttonPin 0
PCF8574 pcf8574_1(0x21,16,15);
PCF8574 pcf8574_2(0x25,16,15);

void setup()
{
    Serial.begin(115200);
/* Set pinMode to OUTPUT*/
   pinMode(buttonPin, INPUT);// key download  IO0

    pcf8574_1.pinMode(P0, OUTPUT);
  pcf8574_1.pinMode(P1, OUTPUT);
  pcf8574_1.pinMode(P2, OUTPUT);
  pcf8574_1.pinMode(P3, OUTPUT);
  pcf8574_1.pinMode(P4, OUTPUT);
  pcf8574_1.pinMode(P5, OUTPUT);
  pcf8574_1.pinMode(P6, OUTPUT);
  pcf8574_1.pinMode(P7, OUTPUT);

  pcf8574_2.pinMode(P0, OUTPUT);
  pcf8574_2.pinMode(P1, OUTPUT);
  pcf8574_2.pinMode(P2, OUTPUT);
  pcf8574_2.pinMode(P3, OUTPUT);
  pcf8574_2.pinMode(P4, OUTPUT);
  pcf8574_2.pinMode(P5, OUTPUT);
  pcf8574_2.pinMode(P6, OUTPUT);
  pcf8574_2.pinMode(P7, OUTPUT);

  pcf8574_1.begin();
  pcf8574_2.begin();
}

void loop()
{
if(digitalRead(buttonPin)==0)
{
      pcf8574_1.digitalWrite(P0, LOW);  delay(100);
    pcf8574_1.digitalWrite(P1, LOW);  delay(100);
    pcf8574_1.digitalWrite(P2, LOW);  delay(100);
    pcf8574_1.digitalWrite(P3, LOW);  delay(100);
    pcf8574_1.digitalWrite(P4, LOW);  delay(100);
    pcf8574_1.digitalWrite(P5, LOW);  delay(100);
    pcf8574_1.digitalWrite(P6, LOW);  delay(100);
    pcf8574_1.digitalWrite(P7, LOW);  delay(100);
 
    pcf8574_2.digitalWrite(P0, LOW);  delay(100);
    pcf8574_2.digitalWrite(P1, LOW);  delay(100);
    pcf8574_2.digitalWrite(P2, LOW);  delay(100);
    pcf8574_2.digitalWrite(P3, LOW);  delay(100); 
    pcf8574_2.digitalWrite(P4, LOW);  delay(100);
    pcf8574_2.digitalWrite(P5, LOW);  delay(100);
    pcf8574_2.digitalWrite(P6, LOW);  delay(100);
    pcf8574_2.digitalWrite(P7, LOW);  delay(100);
  }
  else
  {
    pcf8574_1.digitalWrite(P0, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P1, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P2, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P3, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P4, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P5, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P6, HIGH);  delay(100);
    pcf8574_1.digitalWrite(P7, HIGH);  delay(100);
 
    pcf8574_2.digitalWrite(P0, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P1, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P2, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P3, HIGH);  delay(100); 
    pcf8574_2.digitalWrite(P4, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P5, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P6, HIGH);  delay(100);
    pcf8574_2.digitalWrite(P7, HIGH);  delay(100);
  }
}



Attached Files
.zip   KC868-E16S-8574-DO.zip (Size: 911 bytes / Downloads: 237)
Print this item

Thumbs Up [Arduino IDE demo source code for KC868-E16S]--#02-KC868-E16S-8574-DI
Posted by: KinCony Support - 05-17-2022, 01:17 AM - Forum: KC868-E16S/E16P - No Replies

[Arduino IDE demo source code for KC868-E16S]--#02-KC868-E16S-8574-DI
   

Code:
/*KC868-E16S pcf8574 -digital input code*/
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_IN1(0x22,16,15);
PCF8574 pcf8574_IN2(0x24,16,15);
void setup()
{
    Serial.begin(115200);
    delay(1000);

  pcf8574_IN1.begin();
  pcf8574_IN2.begin();


pcf8574_IN1.pinMode(P0, INPUT);
pcf8574_IN1.pinMode(P1, INPUT);
pcf8574_IN1.pinMode(P2, INPUT);
pcf8574_IN1.pinMode(P3, INPUT);
pcf8574_IN1.pinMode(P4, INPUT);
pcf8574_IN1.pinMode(P5, INPUT);
pcf8574_IN1.pinMode(P6, INPUT);
pcf8574_IN1.pinMode(P7, INPUT);

pcf8574_IN2.pinMode(P0, INPUT);
pcf8574_IN2.pinMode(P1, INPUT);
pcf8574_IN2.pinMode(P2, INPUT);
pcf8574_IN2.pinMode(P3, INPUT);
pcf8574_IN2.pinMode(P4, INPUT);
pcf8574_IN2.pinMode(P5, INPUT);
pcf8574_IN2.pinMode(P6, INPUT);
pcf8574_IN2.pinMode(P7, INPUT);
}

void loop()
{
   if (pcf8574_IN1.digitalRead(P0)==0)  {Serial.println("KEY1 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P1)==0)  {Serial.println("KEY2 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P2)==0)  {Serial.println("KEY3 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P3)==0)  {Serial.println("KEY4 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P4)==0)  {Serial.println("KEY5 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P5)==0)  {Serial.println("KEY6 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P6)==0)  {Serial.println("KEY7 PRESSED");}delay(100);
   if (pcf8574_IN1.digitalRead(P7)==0)  {Serial.println("KEY8 PRESSED");}delay(100);
   
   if (pcf8574_IN2.digitalRead(P0)==0)  {Serial.println("KEY9 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P1)==0)  {Serial.println("KEY10 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P2)==0)  {Serial.println("KEY11 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P3)==0)  {Serial.println("KEY12 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P4)==0)  {Serial.println("KEY13 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P5)==0)  {Serial.println("KEY14 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P6)==0)  {Serial.println("KEY15 PRESSED");}delay(100);
   if (pcf8574_IN2.digitalRead(P7)==0)  {Serial.println("KEY16 PRESSED");}delay(100);   

 
}
   



Attached Files
.zip   KC868-E16S-8574-DI.zip (Size: 783 bytes / Downloads: 244)
Print this item