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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,737
» Latest member: bbtech
» Forum threads: 4,214
» Forum posts: 20,883

Full Statistics

Online Users
There are currently 220 online users.
» 0 Member(s) | 204 Guest(s)
Amazonbot, Baidu, Bytespider, Crawl, Google, Google-Apps-Script, HeadlessChrome, PetalBot, bot

Latest Threads
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2
[arduino code examples fo...
Forum: CO16
Last Post: admin
4 hours ago
» Replies: 0
» Views: 2

  MANAGE HEX STRING COLB
Posted by: Dm81 - 06-04-2022, 01:10 PM - Forum: KC868-HxB series Smart Controller - Replies (4)

Hello
I have also some problem to receive complete string (I'm ususing ararat synapse library in lazarus)
In your debug software works all ok and I check also with other program and all works correctly, I would know if the received string could contain some special Char because if I send this string   "5E0123C001000000000000000000000000000000000000000000000000000000000000000000000000000000FF" (to read digital input for example) I receiv only this
string   "5E0123C011000000000000000000000000000000000000000000000000000000000000000000000000000000FF"
while the correct (and complete) string should be this "5E0123C011000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000101010001010101
I don't understand why I don't receive the last part of string (00000000000000000101010001010101)

thank you in advance

Print this item

  KC868-A6 ESPHome demo config for home assistant
Posted by: admin - 06-01-2022, 07:25 AM - Forum: KC868-A6 - Replies (7)

   

esphome:
  name: kc868-a6

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "b9c07c109b7ecc6c63dac976c0c23a12"

wifi:
  ssid: KinCony
  password: xxxxxxxx

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "A6 Fallback Hotspot"
    password: "GLdHSsZr1p96"

captive_portal:


# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 15
  scan: true
  id: bus_a

# Example configuration entry
pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-8
    address: 0x24

  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x22

# Individual outputs
switch:
  - platform: gpio
    name: "a6-light1"
    id: light1
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a6-light2"
    id: light2
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a6-light3"
    id: light3
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a6-light4"
    id: light4
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a6-light5"
    id: light5
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a6-light6"
    id: light6
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
     

binary_sensor:
  - platform: gpio
    name: "a6-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a6-input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a6-input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a6-input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a6-input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a6-input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true



Attached Files
.txt   KC868-A6_ESPhome.txt (Size: 2.59 KB / Downloads: 2241)
Print this item

  KC868-A6 ESP32 I/O pin define
Posted by: admin - 06-01-2022, 07:23 AM - Forum: KC868-A6 - Replies (7)

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

DS18B20/DHT11/DHT21/LED strip -1: 32
DS18B20/DHT11/DHT21/LED strip -2: 33

DAC1:26
DAC2:25

IIC SDA:4
IIC SCL:15

Input_IIC_address 0x22

Relay_IIC_address 0x24

RS485 RXD: 14
RS485 TXD: 27

SPI_Bus: (For LoRA/nRF24L01)
CS: 5
MOSI: 23
MISO: 19
SCK: 18

LoRA sx1278:
RST:21
DIO0:2

nRF24L01:
CE: 22

RS485:
TXD:27
RXD:14

RS232:
TXD:17
RXD:16

Extend serial port on PCB:
TXD(define by yourself):12
RXD (define by yourself) :13

Print this item

  KC868-A8S GSM ESP32 board released!
Posted by: admin - 06-01-2022, 02:43 AM - Forum: News - No Replies

We have designed KC868-A8S esp32 board, many hardware resource for you to use. it support GSM module for SMS, voice call, GPRS communication. Use SMS or call to turn ON/OFF relay will be very easy for home automation DIY. You can write any code by Arduino IDE to ESP32 wifi/bluetooth/ethernet RS485 module. We will supply demo code for different samples. Everyone can modify and change the code for your own smart home automation system project. it support use by ESPHome for home assistant or tasmota firmware for smart home automation DIY.


[Image: KC868-A8S-1_01.jpg]

Print this item

  Lesson28 - How to send command control RS485 curtain motor
Posted by: admin - 06-01-2022, 02:39 AM - Forum: Home automation training courses - No Replies


This is a demo of curtain motor. this motor support TUYA wifi and RS485 modbus protocol.

Open command

start Motor address function Data address CRC16
Send 55 fe fe 03 01 AD 8A
receive 55 fe fe 03 01 AD 8A

Close command

start Motor address function Data address CRC16
Send 55 fe fe 03 02 ED 8B
receive 55 fe fe 03 02 ED 8B

Set any positon command

start Motor address function Data address value CRC16
Send 55 fe fe 03 04 1E C8 E5
receive 55 Fe fe 03 04 FF* 08 AD


Read current positon command

start Motor address function Data address Data length CRC16
Send 55 fe fe 01 02 01 2B 4D
receive 55 fe fe 01 01 FF* AA 3D

Track range: 0x00—0x64    -  0%--100%

Print this item

Lightbulb [Arduino IDE demo source code for KC868-A8S]--#10-KC868-A8S_GSM_code
Posted by: KinCony Support - 06-01-2022, 01:33 AM - Forum: KC868-A8S - No Replies

[Arduino IDE demo source code for KC868-A8S]--#10-KC868-A8S_GSM_code

Code:
/*KC868-A8S GSM_CODE*/
/*The gsm module is SIM7600*/
/*Send the AT command*/

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

void loop() {
  while (Serial.available()) {
      delay(1);
      Serial1.write(Serial.read());
  }
  while (Serial1.available()) {
       Serial.write(Serial1.read());
  }
}

.zip   sim7600-AT-debug.zip (Size: 542 bytes / Downloads: 962)



Attached Files Thumbnail(s)
   

.zip   sscom32E.zip (Size: 344.42 KB / Downloads: 886)
Print this item

Lightbulb [Arduino IDE demo source code for KC868-A8S]--#09-KC868-A8S_RS485_code
Posted by: KinCony Support - 06-01-2022, 01:23 AM - Forum: KC868-A8S - No Replies

[Arduino IDE demo source code for KC868-A8S]--#09-KC868-A8S_RS485_code

Code:
/*WWW.KINCONY.COM*/
/*KC868-A8s code of RS485 */
void setup() {

Serial2.begin(9600,SERIAL_8N1,32,33);  //  IO32   485RX   IO33 485TX

}

void loop() {
Serial2.println("KinCony ACBDEFG"); // Enter your print string
delay(1500);
}



Attached Files
.zip   rs485.zip (Size: 489 bytes / Downloads: 929)
Print this item

Lightbulb [Arduino IDE demo source code for KC868-A8S]--#08-KC868-A8S_WS2812-RGB_LED_code
Posted by: KinCony Support - 06-01-2022, 01:21 AM - Forum: KC868-A8S - No Replies

[Arduino IDE demo source code for KC868-A8S]--#08-KC868-A8S_WS2812-RGB_LED_code

Code:
/*KC868-A8S  WS2812 RGB LED CODE*/

#include <Adafruit_NeoPixel.h>

Adafruit_NeoPixel rgb_display = Adafruit_NeoPixel(130,12,NEO_GRB + NEO_KHZ800);
//The WS2812 rgb LED is connect to IO12    RGB_LED number is 1

void setup(){
  rgb_display.begin();
}

void loop(){
  /*
    void setPixelColor(uint16_t n, uint32_t c);
    uint16_t n   start from 0
*/
  rgb_display.setPixelColor((1)-1,(0xff00ff));// Set RGB_LED to Blue color
  rgb_display.setBrightness(100);
  rgb_display.show();
  delay(2000);
  rgb_display.setPixelColor((1)-1,(0xff0000));// Set RGB_LED to Blue color
  rgb_display.setBrightness(100);
  rgb_display.show();
  delay(2000);
  rgb_display.setPixelColor((1)-1,(0x00ff00));// Set RGB_LED to Blue color
  rgb_display.setBrightness(100);
  rgb_display.show();
  delay(2000);
 

}



Attached Files
.zip   WS2812-RGB_LED.zip (Size: 871 bytes / Downloads: 884)
Print this item

Lightbulb [Arduino IDE demo source code for KC868-A8S]--#07-KC868-A8S_PCF8574-Digital output_co
Posted by: KinCony Support - 06-01-2022, 01:20 AM - Forum: KC868-A8S - Replies (2)

[Arduino IDE demo source code for KC868-A8S]--#07-KC868-A8S_PCF8574-Digital output_code

Code:
/*KC868-A8S  PCF8574 Digital output code*/

#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574(0x24,4,5);

void setup()
{
    Serial.begin(115200);
//    delay(1000);

    // Set pinMode to OUTPUT
  pcf8574.pinMode(P0, OUTPUT);
  pcf8574.pinMode(P1, OUTPUT);
  pcf8574.pinMode(P2, OUTPUT);
  pcf8574.pinMode(P3, OUTPUT);
  pcf8574.pinMode(P4, OUTPUT);
  pcf8574.pinMode(P5, OUTPUT);
  pcf8574.pinMode(P6, OUTPUT);
  pcf8574.pinMode(P7, OUTPUT);
   pcf8574.begin();
   
}

void loop()
{
   pcf8574.digitalWrite(P0, HIGH);  delay(300); 
   pcf8574.digitalWrite(P1, HIGH);  delay(300); 
   pcf8574.digitalWrite(P2, HIGH);  delay(300); 
   pcf8574.digitalWrite(P3, HIGH);  delay(300);
   pcf8574.digitalWrite(P4, HIGH);  delay(300); 
   pcf8574.digitalWrite(P5, HIGH);  delay(300);
   pcf8574.digitalWrite(P6, HIGH);  delay(300); 
   pcf8574.digitalWrite(P7, HIGH);  delay(300);
   pcf8574.digitalWrite(P0, LOW);   delay(300);
   pcf8574.digitalWrite(P1, LOW);   delay(300);
   pcf8574.digitalWrite(P2, LOW);   delay(300);
   pcf8574.digitalWrite(P3, LOW);   delay(300);
   pcf8574.digitalWrite(P4, LOW);   delay(300);
   pcf8574.digitalWrite(P5, LOW);   delay(300);
   pcf8574.digitalWrite(P6, LOW);   delay(300);
   pcf8574.digitalWrite(P7, LOW);   delay(300);

}



Attached Files
.zip   PCF8574-DO.zip (Size: 792 bytes / Downloads: 1019)
Print this item

Lightbulb [Arduino IDE demo source code for KC868-A8S]--#06-KC868-A8S_PCF8574-Digital input_cod
Posted by: KinCony Support - 06-01-2022, 01:19 AM - Forum: KC868-A8S - No Replies

[Arduino IDE demo source code for KC868-A8S]--#06-KC868-A8S_PCF8574-Digital input_code

Code:
/*KC868-A8S PCF8574 Digital input code*/
/*digital input will trigger digital output */
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_IN1(0x22,4,5);
PCF8574 pcf8574_RE(0x24,4,5);
void setup()
{
    Serial.begin(115200);
    delay(1000);

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.pinMode(P6, OUTPUT);
pcf8574_RE.pinMode(P7, OUTPUT);
pcf8574_RE.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_IN1.begin();

}

void loop()
{
uint8_t val1 = pcf8574_IN1.digitalRead(P0);
uint8_t val2 = pcf8574_IN1.digitalRead(P1);
uint8_t val3 = pcf8574_IN1.digitalRead(P2);
uint8_t val4 = pcf8574_IN1.digitalRead(P3);
uint8_t val5 = pcf8574_IN1.digitalRead(P4);
uint8_t val6 = pcf8574_IN1.digitalRead(P5);
uint8_t val7 = pcf8574_IN1.digitalRead(P6);
uint8_t val8 = pcf8574_IN1.digitalRead(P7);
if (val1==LOW) {
  pcf8574_RE.digitalWrite(P0,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P0,HIGH);
if (val2==LOW) {
  pcf8574_RE.digitalWrite(P1,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P1,HIGH);
if (val3==LOW)  {
  pcf8574_RE.digitalWrite(P2,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P2,HIGH);
if (val4==LOW)  {
  pcf8574_RE.digitalWrite(P3,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P3,HIGH);
if (val5==LOW)  {
  pcf8574_RE.digitalWrite(P4,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P4,HIGH);
if (val6==LOW)  {
  pcf8574_RE.digitalWrite(P5,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P5,HIGH);
if (val7==LOW)  {
  pcf8574_RE.digitalWrite(P6,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P6,HIGH);
if (val8==LOW)  {
  pcf8574_RE.digitalWrite(P7,LOW);
  delay(100);
  }
else pcf8574_RE.digitalWrite(P7,HIGH);

    delay(300);
}



Attached Files
.zip   PCF8574-DI.zip (Size: 940 bytes / Downloads: 899)
Print this item