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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,369
» Latest member: ThisITGuy
» Forum threads: 2,844
» Forum posts: 15,033

Full Statistics

Online Users
There are currently 155 online users.
» 0 Member(s) | 138 Guest(s)
Amazonbot, Bing, Bytespider, Crawl, Google, PetalBot, WordPress/, Yandex, bot, owler

Latest Threads
Pull up on A8
Forum: KC868-A series and Uair Smart Controller
Last Post: heffneil
1 hour ago
» Replies: 17
» Views: 238
Using 12v on Digital Inpu...
Forum: KC868-A16
Last Post: jorgete
6 hours ago
» Replies: 12
» Views: 363
KinCony ESP32-S3 Core Boa...
Forum: Extender module
Last Post: AshS
10 hours ago
» Replies: 36
» Views: 1,395
A16: IFTTT Time based act...
Forum: KC868-A16
Last Post: sebfromgermany
Yesterday, 01:20 PM
» Replies: 17
» Views: 163
analog input resolution 3...
Forum: KC868-A16
Last Post: Yosemite
Yesterday, 12:43 PM
» Replies: 15
» Views: 387
[Arduino IDE demo source ...
Forum: KC868-A16
Last Post: wolli
Yesterday, 11:41 AM
» Replies: 7
» Views: 2,586
KC868-HA-V21 serial port ...
Forum: KC868-HA /HA v2
Last Post: admin
Yesterday, 10:15 AM
» Replies: 8
» Views: 96
Using B16M for driving LE...
Forum: B16M
Last Post: admin
Yesterday, 10:11 AM
» Replies: 3
» Views: 11
KC868-M30 - how to get it...
Forum: KC868-M16 / M1 / MB / M30
Last Post: msmrz
Yesterday, 09:09 AM
» Replies: 4
» Views: 45
KC868-HA RS485 INPUT & OU...
Forum: KC868-HA /HA v2
Last Post: admin
03-06-2025, 10:57 PM
» Replies: 29
» Views: 6,596

  How can I control somfy rolling shutter over home assistant frequency 433.42 MHz
Posted by: engmohades - 03-25-2023, 11:14 PM - Forum: DIY Project - Replies (1)

Please, How can I control somfy rolling shutter over home assistant
frequency 433.42 MHz



Attached Files Thumbnail(s)
   
Print this item

  Relay
Posted by: lori72 - 03-24-2023, 07:31 PM - Forum: KC868-A4S - Replies (7)

Hi, I can't understand which doors are to be configured to command the relays from ESP32. 
can you help me. From the example file I can't understand, thanks

Print this item

  KC868-AIO configure yaml for ESPhome
Posted by: admin - 03-24-2023, 12:11 AM - Forum: KC868-AIO - Replies (25)

   

.txt   KC868-AIO-ESPHome.txt (Size: 20.73 KB / Downloads: 1430)

Print this item

  KC868-AIO ESP32 I/O pin define
Posted by: admin - 03-24-2023, 12:09 AM - Forum: KC868-AIO - No Replies

ESP32 ANALOG_A1 GPIO36 For (Analog Multiplexer: cd74hc4067) to extend "analog input" 1-16

ESP32 ANALOG_A2  GPIO39  analog input 17
ESP32 ANALOG_A3  GPIO34  analog input 18
ESP32 ANALOG_A4  GPIO35  analog input 19

IIC Bus:A

SDA-A:GPIO4
SCL-A:GPIO16

PCF8575:U40 (output 1-16): 100 100 = 0x24
PCF8575:U41 (output 17-32): 100 101 = 0x25

PCF8575:U42 (output 33-38): 100 110 = 0x26

cd74hc4067
S0-A: PCF8575->U42->P10 (output 33)
S1-B: PCF8575->U42->P11 (output 34)
S2-C: PCF8575->U42->P12 (output 35)
S3-D: PCF8575->U42->P13 (output 36)

free LEDs:

LED-D7: PCF8575->U42->P14 (output 37)
LED-D8: PCF8575->U42->P15 (output 38)
-----------------------------------------------------------------------------------

PCF8575:U35 (input 1-16): 100 001 = 0x21
PCF8575:U37 (input 17-32): 100 010 = 0x22

PCF8575:U38 (input 33-48): 100 011 = 0x23
PCF8575:U42 (input 49-58): 100 110 = 0x26

PCF8575->U42->P0 (input 49)
PCF8575->U42->P1 (input 50)
PCF8575->U42->P2 (input 51)
PCF8575->U42->P3 (input 52)
PCF8575->U42->P4 (input 53)
PCF8575->U42->P5 (input 54)
PCF8575->U42->P6 (input 55)
PCF8575->U42->P7 (input 56)
PCF8575->U42->P14 (input 57)
PCF8575->U42->P15 (input 58)

-----------------------------------------------------------------------------------------

PCA9685: address 0x00
-----------------------------------------------------------------------------------------

Button-S1: reset
Button-S2: GPIO0
Button-S3: PCF8575->U42->P14 (input 57)
Button-S4: PCF8575->U42->P15 (input 58)

-------------------------------------------------------------------------------------------


DS18B20/DHT11/DHT21/LED strip -(TP1): GPIO14
DS18B20/DHT11/DHT21/LED strip -(TP2): GPIO5

-------------------------------------------------------------------------------------------

Ethernet (LAN8720) I/O define:

#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

-------------------------------------------------------------------------------------------

RS485:
RXD(A): GPIO32
TXD(B): GPIO33

------------------------------------------------------------------------------------------

4G GSM Module / Extend serial port:

RXD: GPIO13
TXD: GPIO15

---------------------------------------------------------------------------------------------

DS3231 RTC module: IIC address 0x68
EEPROM's default I2C address is 0x57

Print this item

  KC868-AIO datasheet PDF
Posted by: admin - 03-24-2023, 12:08 AM - Forum: KC868-AIO - No Replies


.pdf   KC868-AIO.pdf (Size: 18.41 MB / Downloads: 2339)

Print this item

  Interruptions from PCF8574
Posted by: istopnic - 03-23-2023, 02:06 PM - Forum: KC868-A16 - Replies (1)

Is it possible to use interruptions on the I2C bus. As I understand, the pins of interruptions from PCF8574 is not connect anywhere.
Which ESP pin can be used to interrupt?

Print this item

  [Arduino source code for KC868-AIO]-08 DIGITAL_INPUT
Posted by: KinCony Support - 03-23-2023, 01:24 AM - Forum: KC868-AIO - No Replies

[Arduino source code for KC868-AIO]-08 DIGITAL_INPUT

Code:
#include "Arduino.h"
#include "PCF8575.h"

// Set i2c address

PCF8575 pcf8575_IN1(0x21,4,16);
PCF8575 pcf8575_IN2(0x22,4,16);
PCF8575 pcf8575_IN3(0x23,4,16);
PCF8575 pcf8575_IN4(0x26,4,16);

unsigned long timeElapsed;
void setup()
{
    Serial.begin(115200);
  pcf8575_IN1.begin();
  pcf8575_IN2.begin();
  pcf8575_IN3.begin();
  pcf8575_IN4.begin();
   
  pcf8575_IN1.pinMode(P0,INPUT);
  pcf8575_IN1.pinMode(P1,INPUT);
  pcf8575_IN1.pinMode(P2,INPUT);
  pcf8575_IN1.pinMode(P3,INPUT);
  pcf8575_IN1.pinMode(P4,INPUT);
  pcf8575_IN1.pinMode(P5,INPUT);
  pcf8575_IN1.pinMode(P6,INPUT);
  pcf8575_IN1.pinMode(P7,INPUT);
  pcf8575_IN1.pinMode(P8,INPUT);
  pcf8575_IN1.pinMode(P9,INPUT);
  pcf8575_IN1.pinMode(P10,INPUT);
  pcf8575_IN1.pinMode(P11,INPUT);
  pcf8575_IN1.pinMode(P12,INPUT);
  pcf8575_IN1.pinMode(P13,INPUT);
  pcf8575_IN1.pinMode(P14,INPUT);
  pcf8575_IN1.pinMode(P15,INPUT);

  pcf8575_IN2.pinMode(P0,INPUT);
  pcf8575_IN2.pinMode(P1,INPUT);
  pcf8575_IN2.pinMode(P2,INPUT);
  pcf8575_IN2.pinMode(P3,INPUT);
  pcf8575_IN2.pinMode(P4,INPUT);
  pcf8575_IN2.pinMode(P5,INPUT);
  pcf8575_IN2.pinMode(P6,INPUT);
  pcf8575_IN2.pinMode(P7,INPUT);
  pcf8575_IN2.pinMode(P8,INPUT);
  pcf8575_IN2.pinMode(P9,INPUT);
  pcf8575_IN2.pinMode(P10,INPUT);
  pcf8575_IN2.pinMode(P11,INPUT);
  pcf8575_IN2.pinMode(P12,INPUT);
  pcf8575_IN2.pinMode(P13,INPUT);
  pcf8575_IN2.pinMode(P14,INPUT);
  pcf8575_IN2.pinMode(P15,INPUT);
 
  pcf8575_IN3.pinMode(P0,INPUT);
  pcf8575_IN3.pinMode(P1,INPUT);
  pcf8575_IN3.pinMode(P2,INPUT);
  pcf8575_IN3.pinMode(P3,INPUT);
  pcf8575_IN3.pinMode(P4,INPUT);
  pcf8575_IN3.pinMode(P5,INPUT);
  pcf8575_IN3.pinMode(P6,INPUT);
  pcf8575_IN3.pinMode(P7,INPUT);
  pcf8575_IN3.pinMode(P8,INPUT);
  pcf8575_IN3.pinMode(P9,INPUT);
  pcf8575_IN3.pinMode(P10,INPUT);
  pcf8575_IN3.pinMode(P11,INPUT);
  pcf8575_IN3.pinMode(P12,INPUT);
  pcf8575_IN3.pinMode(P13,INPUT);
  pcf8575_IN3.pinMode(P14,INPUT);
  pcf8575_IN3.pinMode(P15,INPUT);

  pcf8575_IN4.pinMode(P0,INPUT);
  pcf8575_IN4.pinMode(P1,INPUT);
  pcf8575_IN4.pinMode(P2,INPUT);
  pcf8575_IN4.pinMode(P3,INPUT);
  pcf8575_IN4.pinMode(P4,INPUT);
  pcf8575_IN4.pinMode(P5,INPUT);
  pcf8575_IN4.pinMode(P6,INPUT);
  pcf8575_IN4.pinMode(P7,INPUT);
 
  pcf8575_IN4.pinMode(P8,OUTPUT);
  pcf8575_IN4.pinMode(P9,OUTPUT);
  pcf8575_IN4.pinMode(P10,OUTPUT);
  pcf8575_IN4.pinMode(P11,OUTPUT);
  pcf8575_IN4.pinMode(P12,OUTPUT);
  pcf8575_IN4.pinMode(P13,OUTPUT);
 
  pcf8575_IN4.pinMode(P14,INPUT);
  pcf8575_IN4.pinMode(P15,INPUT);
}

void loop()
{

uint16_t var_rcv = 0;

var_rcv = pcf8575_IN1.digitalReadAll();
if (var_rcv!=65535)
  {
    Serial.print("input16-input1 state:");
    Serial.println(var_rcv,BIN);
  }

var_rcv = pcf8575_IN2.digitalReadAll();
if (var_rcv!=65535)
  {
    Serial.print("input32-input17 state:");
    Serial.println(var_rcv,BIN);
  }

var_rcv = pcf8575_IN3.digitalReadAll();
if (var_rcv!=65535)
  {
    Serial.print("input48-input33 state:");
    Serial.println(var_rcv,BIN);
  }

var_rcv = pcf8575_IN4.digitalReadAll();
if (var_rcv!=65535)
  {
    Serial.print("input64-input49 state:");
    Serial.println(var_rcv,BIN);
  }
   delay(500);
}



Attached Files
.zip   KC868-AIO-PCF8575_DI_XU.zip (Size: 940 bytes / Downloads: 371)
Print this item

  [Arduino source code for KC868-AIO]-07 PWM_ALL_ON AND OFF
Posted by: KinCony Support - 03-23-2023, 01:24 AM - Forum: KC868-AIO - Replies (2)

[Arduino source code for KC868-AIO]-07 PWM_ALL_ON AND OFF

Code:
/* KC868-AIO_PWM OUTPUT AO_O01----AO_O016*/

#include "PCA9685.h"
PCA9685 pwmController;                 

void setup() {
    Serial.begin(115200);               
    Wire.begin(4,16);                   
    pwmController.resetDevices();     
    pwmController.init();               
}

void loop() {
    pwmController.setPWMFrequency(100);       
          for(int j=0;j<=15;j++){
              pwmController.setChannelPWM(j, 0);
              Serial.println(pwmController.getChannelPWM(j));
           }
           delay(1000);
         for(int j=0;j<=15;j++){
              pwmController.setChannelPWM(j, 4096);
              Serial.println(pwmController.getChannelPWM(j));
           }
           delay(3000);

   
}



Attached Files
.zip   KC868-AIO-PWM_ALL_ON_OFF.zip (Size: 687 bytes / Downloads: 330)
Print this item

  [Arduino source code for KC868-AIO]-06 RS485
Posted by: KinCony Support - 03-23-2023, 01:24 AM - Forum: KC868-AIO - No Replies

[Arduino source code for KC868-AIO]-06 RS485

Code:
/*/*WWW.KINCONY.COM*/
/*KC868-AIO code of RS485 */

void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,32,33);//AIO
   Serial2.println("KC868-AIO RS485 SEND is OK!!");
   Serial2.println("******************");
 
}

void loop() {
  /*print the received data of RS485 port*/
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it
   }
  delay(200);
}



Attached Files
.zip   KC868-AIO_RS485.zip (Size: 614 bytes / Downloads: 306)
Print this item

  [Arduino source code for KC868-AIO]-05 DIGITAL_OUTPUT
Posted by: KinCony Support - 03-23-2023, 01:23 AM - Forum: KC868-AIO - No Replies

[Arduino source code for KC868-AIO]-05 DIGITAL_OUTPUT

Code:
/*KC868-AIO OUTPUT 32 RELAYS*/
#include "Arduino.h"
#include "PCF8575.h"

#define SDA 4
#define SCL 16
#define delaytime 50
// Set i2c address
PCF8575 pcf8575_R1(0x24,SDA,SCL);
PCF8575 pcf8575_R2(0x25,SDA,SCL);
PCF8575 pcf8575_R3(0x26,SDA,SCL);

void setup()
{
  Serial.begin(115200);
for(int j=1;j<=3;j++){
   if(j==1){
        for(int i=0;i<=15;i++){
          pcf8575_R1.pinMode(i,OUTPUT);
    }
   }
   if(j==2){
        for(int i=0;i<=15;i++){
          pcf8575_R2.pinMode(i,OUTPUT);
    }
   }
   if(j==3){
        for(int i=0;i<=7;i++){
               pcf8575_R3.pinMode(i,INPUT);//0-7 input
            }
        for(int i=8;i<=13;i++){
               pcf8575_R3.pinMode(i,OUTPUT);//8-13 OUTPUT
            }
        for(int i=14;i<=15;i++){
               pcf8575_R3.pinMode(i,INPUT);//14-15 INPUT
            }   
    }
   }
  pcf8575_R1.begin();
  pcf8575_R2.begin();
  pcf8575_R3.begin();
}
void loop()
{
for(int j=1;j<=3;j++){
  if(j==1){
      for(int i=0;i<=15;i++){
      pcf8575_R1.digitalWrite(i,LOW);
      delay(delaytime);
      }
  }
  if(j==2){
    for(int i=0;i<=15;i++){
      pcf8575_R2.digitalWrite(i,LOW);
      delay(delaytime);
      }
   }
  if(j==3){
    for(int i=12;i<=13;i++){
      pcf8575_R3.digitalWrite(i,LOW);
      delay(delaytime);
    }
  }
}

for(int j=1;j<=3;j++){
  if(j==1){
      for(int i=0;i<=15;i++){
      pcf8575_R1.digitalWrite(i,HIGH);
      delay(delaytime);
      }
  }
  if(j==2){
    for(int i=0;i<=15;i++){
      pcf8575_R2.digitalWrite(i,HIGH);
      delay(delaytime);
      }
   }
  if(j==3){
    for(int i=12;i<=13;i++){
      pcf8575_R3.digitalWrite(i,HIGH);
      delay(delaytime);
    }
  }
}
}



Attached Files
.zip   KC868-AIO_PCF8575_DO.zip (Size: 832 bytes / Downloads: 296)
Print this item