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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,367
» Latest member: johnkalvinsmith
» Forum threads: 2,574
» Forum posts: 13,305

Full Statistics

Online Users
There are currently 56 online users.
» 1 Member(s) | 40 Guest(s)
Bing, Crawl, Google, PetalBot, Semrush, Yandex, bot, owler, johnkalvinsmith

Latest Threads
change wake up name
Forum: KinCony AS
Last Post: gal
3 hours ago
» Replies: 12
» Views: 72
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: xarouli5
4 hours ago
» Replies: 17
» Views: 179
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
6 hours ago
» Replies: 32
» Views: 390
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
11 hours ago
» Replies: 10
» Views: 60
KC868-A8 Schematic
Forum: KC868-A8
Last Post: admin
11 hours ago
» Replies: 7
» Views: 45
"KCS" v2.2.8 firmware BIN...
Forum: "KCS" firmware system
Last Post: admin
11 hours ago
» Replies: 2
» Views: 163
Dimensions/drawings of bo...
Forum: Schematic and diagram
Last Post: admin
11 hours ago
» Replies: 1
» Views: 20
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: admin
12-16-2024, 10:55 PM
» Replies: 12
» Views: 446
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: admin
12-16-2024, 10:53 PM
» Replies: 5
» Views: 34
M16 SHT31 sensor disconne...
Forum: KC868-M16 / M1 / MB / M30
Last Post: bsarra
12-16-2024, 08:36 PM
» Replies: 4
» Views: 38

  [arduino code examples for A32 Pro]-03 Read analog input ports value
Posted by: admin - 09-13-2024, 11:46 PM - Forum: KC868-A32/A32 Pro - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* Description:
* This Arduino program reads analog values from four analog input pins (A1, A2, A3, A4)
* and prints the values to the Serial Monitor. The analog inputs are defined with specific
* GPIO pins and the program reads the voltage levels from these pins every 2 seconds.
*
* Pin Definitions:
* - A1: GPIO 7
* - A2: GPIO 6
* - A3: GPIO 5
* - A4: GPIO 4
*/

#define ANALOG_A1   7   // Define GPIO pin for analog input A1
#define ANALOG_A2   6   // Define GPIO pin for analog input A2
#define ANALOG_A3   5   // Define GPIO pin for analog input A3
#define ANALOG_A4   4   // Define GPIO pin for analog input A4

void setup()
{
    Serial.begin(115200); // Initialize serial communication at 115200 baud rate
    delay(500); // Short delay to allow serial communication to start

    pinMode(ANALOG_A1, INPUT); // Set GPIO 5 as an input for analog signal A1
    pinMode(ANALOG_A2, INPUT); // Set GPIO 7 as an input for analog signal A2
    pinMode(ANALOG_A3, INPUT); // Set GPIO 6 as an input for analog signal A3
    pinMode(ANALOG_A4, INPUT); // Set GPIO 4 as an input for analog signal A4
}

void loop()
{
    // Read and print analog values from the defined pins
    Serial.print("A1=");
    Serial.println(analogRead(ANALOG_A1)); // Read and print the value from A1
    Serial.print("A2=");
    Serial.println(analogRead(ANALOG_A2)); // Read and print the value from A2
    Serial.print("A3=");
    Serial.println(analogRead(ANALOG_A3)); // Read and print the value from A3
    Serial.print("A4=");
    Serial.println(analogRead(ANALOG_A4)); // Read and print the value from A4
   
    delay(2000); // Wait for 2 seconds before the next reading
}
arduino ino file download: 
.zip   3-analog-input.zip (Size: 768 bytes / Downloads: 51)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 
.zip   3-analog-input.ino.merged.zip (Size: 182.47 KB / Downloads: 34)

Print this item

  [arduino code examples for A32 Pro]-02 Read digital input ports state
Posted by: admin - 09-13-2024, 11:44 PM - Forum: KC868-A32/A32 Pro - No Replies

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

  Program functionality:
  This program uses an ESP32-S3 to read inputs from two XL9535 I/O expander chips
  (with I2C addresses 0x24 and 0x25) and one PCF8574 I/O expander (with I2C address 0x23) via I2C.
  The XL9535 chips handle 1-32 channels, while the PCF8574 chip handles channels 33-40.
  The program reads the state of all these inputs and prints them in binary format to the serial monitor.

  Key points:
  - The I2C bus is initialized on GPIO pins 11 (SDA) and 10 (SCL) with a frequency of 40kHz.
  - The XL9535 chips read the state of input pins for channels 1-32.
  - The PCF8574 chip reads the state of input pins for channels 33-40.
  - The state of the inputs is printed to the serial monitor in binary format every second.
*/

#include <PCA95x5.h>
#include <Wire.h>

// Initialize the PCA9555 objects for XL9535 chips (1-32 channels)
PCA9555 ioex1;  // For channels 1-16 (I2C address 0x24)
PCA9555 ioex2;  // For channels 17-32 (I2C address 0x25)

// Define the I2C address for the PCF8574 chip (for channels 33-40)
const int pcf8574_address = 0x23;

void setup() {
    // Start serial communication for debugging
    Serial.begin(115200);
    delay(2000);  // Wait for 2 seconds to ensure everything is ready

    // Initialize the I2C bus with GPIO 11 as SDA and GPIO 10 as SCL, 40kHz frequency
    Wire.begin(11, 10, 40000);

    // Attach the first PCA9555 device (for channels 1-16)
    ioex1.attach(Wire, 0x24);
    ioex1.polarity(PCA95x5::Polarity::ORIGINAL_ALL);
    ioex1.direction(PCA95x5::Direction::IN_ALL);  // Set all pins as inputs

    // Attach the second PCA9555 device (for channels 17-32)
    ioex2.attach(Wire, 0x25);
    ioex2.polarity(PCA95x5::Polarity::ORIGINAL_ALL);
    ioex2.direction(PCA95x5::Direction::IN_ALL);  // Set all pins as inputs
}

void loop() {
    // Read and print the state of inputs from the first PCA9555 (channels 1-16)
    Serial.print("1-16 input states: ");
    Serial.println(ioex1.read(), BIN);

    // Read and print the state of inputs from the second PCA9555 (channels 17-32)
    Serial.print("17-32 input states: ");
    Serial.println(ioex2.read(), BIN);

    // Read and print the state of inputs from the PCF8574 (channels 33-40)
    Serial.print("33-40 input states: ");
    byte pcf8574_state = readPCF8574();
    Serial.println(pcf8574_state, BIN);

    delay(1000);  // Wait for 1 second before reading again
}

// Function to read the state of the PCF8574 (channels 33-40)
byte readPCF8574() {
    Wire.requestFrom(pcf8574_address, 1);  // Request 1 byte from PCF8574

    if (Wire.available()) {
        return Wire.read();  // Return the byte representing the state of inputs
    } else {
        return 0xFF;  // Return 0xFF if no data is available (all inputs are high)
    }
}
arduino ino file download: 
.zip   2-digital-input.zip (Size: 1.19 KB / Downloads: 42)
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: 187.5 KB / Downloads: 33)

Print this item

  [arduino code examples for A32 Pro]-01 Turn ON/OFF relay
Posted by: admin - 09-13-2024, 11:42 PM - Forum: KC868-A32/A32 Pro - No Replies

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

  Program functionality:
  This program uses ESP32-S3 to control two PCA9555 I/O expander chips via I2C,
  controlling a total of 32 relays. The first PCA9555 chip has an I2C address of 0x21
  and controls relays 1-16, while the second PCA9555 chip has an I2C address of 0x22
  and controls relays 17-32.

  The relays are turned ON (set to low) and OFF (set to high) in sequence with a small
  delay between each operation. The program reads and prints the current state of the
  relays to the serial monitor after each change.
*/

#include <PCA95x5.h>

// Initialize two PCA9555 objects for controlling 32 relays
PCA9555 ioex1; // 1-16 relays (I2C address 0x21)
PCA9555 ioex2; // 17-32 relays (I2C address 0x22)

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

    // Initialize the I2C bus with GPIO 11 as SDA and GPIO 10 as SCL, 100kHz frequency
    Wire.begin(11, 10, 100000);

    // Configure the first PCA9555 chip (1-16 relays)
    ioex1.attach(Wire, 0x21);  // Set I2C address to 0x21
    ioex1.polarity(PCA95x5::Polarity::ORIGINAL_ALL);  // Set polarity to normal (no inversion)
    ioex1.direction(PCA95x5::Direction::OUT_ALL);  // Set all pins as output
    ioex1.write(PCA95x5::Level::H_ALL);  // Initialize all outputs to HIGH (relays OFF)

    // Configure the second PCA9555 chip (17-32 relays)
    ioex2.attach(Wire, 0x22);  // Set I2C address to 0x22
    ioex2.polarity(PCA95x5::Polarity::ORIGINAL_ALL);  // Set polarity to normal (no inversion)
    ioex2.direction(PCA95x5::Direction::OUT_ALL);  // Set all pins as output
    ioex2.write(PCA95x5::Level::H_ALL);  // Initialize all outputs to HIGH (relays OFF)

    delay(50);  // Wait for settings to take effect
}

void loop() {
    // Control the first PCA9555 chip (1-16 relays)
    for (size_t i = 0; i < 16; ++i) {
        Serial.print("set port low (chip 1): ");  // Turning ON the relay
        Serial.println(i);

        ioex1.write((PCA95x5::Port::Port)i, PCA95x5::Level::L);  // Set the relay to LOW (ON)
        Serial.println(ioex1.read(), BIN);  // Print the current state of all relays (in binary)
        delay(50);  // Small delay between each relay activation
    }

    // Control the second PCA9555 chip (17-32 relays)
    for (size_t i = 0; i < 16; ++i) {
        Serial.print("set port low (chip 2): ");  // Turning ON the relay
        Serial.println(i + 16);  // Display relay numbers 17-32

        ioex2.write((PCA95x5::Port::Port)i, PCA95x5::Level::L);  // Set the relay to LOW (ON)
        Serial.println(ioex2.read(), BIN);  // Print the current state of all relays (in binary)
        delay(50);  // Small delay between each relay activation
    }

    // Turn off the first PCA9555 chip (1-16 relays)
    for (size_t i = 0; i < 16; ++i) {
        Serial.print("set port high (chip 1): ");  // Turning OFF the relay
        Serial.println(i);

        ioex1.write((PCA95x5::Port::Port)i, PCA95x5::Level::H);  // Set the relay to HIGH (OFF)
        Serial.println(ioex1.read(), BIN);  // Print the current state of all relays (in binary)
        delay(50);  // Small delay between each relay deactivation
    }

    // Turn off the second PCA9555 chip (17-32 relays)
    for (size_t i = 0; i < 16; ++i) {
        Serial.print("set port high (chip 2): ");  // Turning OFF the relay
        Serial.println(i + 16);  // Display relay numbers 17-32

        ioex2.write((PCA95x5::Port::Port)i, PCA95x5::Level::H);  // Set the relay to HIGH (OFF)
        Serial.println(ioex2.read(), BIN);  // Print the current state of all relays (in binary)
        delay(50);  // Small delay between each relay deactivation
    }
}
arduino ino file download: 
.zip   1-relay.zip (Size: 1.13 KB / Downloads: 43)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 
.zip   1-relay.ino.merged.zip (Size: 187.64 KB / Downloads: 29)

Print this item

  communication with I2C sensor
Posted by: remiasz - 09-13-2024, 01:47 PM - Forum: KC868-A series and Uair Smart Controller - Replies (3)

Does the KCS firmware allow communication with sensors connected to the I2C port? 
How?

Print this item

  Get PWM out, even by sacrificing other functionality
Posted by: tarajas - 09-12-2024, 09:50 PM - Forum: KC868-A4 - Replies (7)

Hi,

I have a 1.2.4 version A4 board and I was wondering if there are some quick and dirty adjustments to be made potentially even with some small amount of soldering to get a PWM output on the board maybe?

Like I could sacrifice the 433MHz related functionality for examle?

Is there maybe such a modification?

Thanks for the help in advance

Print this item

  AIO board has failed
Posted by: telewizard13 - 09-12-2024, 09:06 PM - Forum: KC868-AIO - Replies (8)

My 3 month old KC868-AIO board has failed. It no longer communicates with my Home Assistant over ethernet, doesn't appear on WIFI.  Can't connect via USB and the ESP chip on the board is VERY hot. There is no activity on the ethernet connector. Not sure what failed or why, because it was working perfectly even earlier today. The power supply is fine and measures 12.45 volts and the power LEDs are lit, but it appears to be brain dead. I powered it down and disconnected all the I/O plugs and there was no change. 
-Telewizard 13 



Attached Files Image(s)
   
Print this item

  Error con entrada P0 y teclado wiegand
Posted by: sistemasyusa - 09-12-2024, 12:14 PM - Forum: KC868-A6 - Replies (1)

buen día , ya resolví lo del teclado wiegand, ahora el problema fue que al meter ese codigo como tengo la entrada digital 1 configurada para si la pongo a gnd se activa el rele 2 ahora se activa solo porque pasa eso ? Si antes no pasaba eso envío foto del teclado wiegand conectado y los cables amarillos son el botón simulado de la entrada P0



Attached Files Thumbnail(s)
   
Print this item

  Compatibilidad con teclado wiegand.
Posted by: sistemasyusa - 09-12-2024, 01:01 AM - Forum: KC868-A6 - Replies (4)

Buen día hasta el momento me funciona bien la tarjeta estoy emocionado por las ventajas que ofrece , pero me gustaría saber si puede ser compatible con algún teclado wiegand, ví la publicación que tienen con otra tarjeta pero no me funciona , alguna librería para usarla con esta tarjeta y en qué puerto  

GRACIAS

Print this item

  KC868-A8 V1.5 PCF8574
Posted by: GVDC - 09-11-2024, 11:07 AM - Forum: KC868-A8 - No Replies

Hello, I am only a beginner and have problems with interrupt.
I have KC868-A8 V1.5 and use PCF8574. 
The program runs OK, but for the security of the project I need to watch that 1 parameter measured with an analog tool,  stops the whole sketch at avery moment when the parameter is to high.
Is it possible with my Kincony?
Can somebody help with the code? 
Which version on the IDE do I need? 

Kind regards

Print this item

  Water flow meter on a KC868-A16
Posted by: Marty - 09-10-2024, 01:31 PM - Forum: KC868-A16 - Replies (7)

How can I use water flow meter, if the pcf8574 hasn't activates the interrupts, I need doit in C++, I don't have clue

Print this item