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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,092
» Latest member: PaulWu
» Forum threads: 4,254
» Forum posts: 21,077

Full Statistics

Online Users
There are currently 264 online users.
» 1 Member(s) | 242 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, DuckDuckGo, Google, PetalBot, Twitter, bot, cmeyer5

Latest Threads
KC868-HAv2 phantom press ...
Forum: KC868-HA /HA v2
Last Post: phrfpeixoto
Yesterday, 01:57 AM
» Replies: 2
» Views: 1,480
KC868-A6 Analog inputs
Forum: KC868-A6
Last Post: Tomas4289
09-28-2026, 12:57 PM
» Replies: 2
» Views: 36
N60/N30/N20/N10 PC softwa...
Forum: N10
Last Post: admin
09-28-2026, 12:49 PM
» Replies: 13
» Views: 1,633
getting the A8A inputs to...
Forum: Development
Last Post: admin
09-28-2026, 08:38 AM
» Replies: 5
» Views: 207
Best way to read from N30
Forum: N30
Last Post: admin
09-27-2026, 12:20 AM
» Replies: 3
» Views: 48
extend KC868-A16v3
Forum: KC868-A series and Uair Smart Controller
Last Post: bitet96717
09-24-2026, 06:41 AM
» Replies: 2
» Views: 241
Las Firmware ?
Forum: KC868-A16
Last Post: admin
09-22-2026, 11:15 PM
» Replies: 8
» Views: 947
kc868-a6 analog input
Forum: KC868-A6
Last Post: admin
09-21-2026, 11:38 PM
» Replies: 1
» Views: 148
A32 pro tuya
Forum: "KCS" v3 firmware
Last Post: admin
09-21-2026, 11:38 PM
» Replies: 1
» Views: 73
Disconnect loop with Home...
Forum: F16
Last Post: admin
09-21-2026, 01:16 AM
» Replies: 3
» Views: 135

  [arduino code examples for N20]-01 Read digital input ports state
Posted by: admin - 08-03-2025, 03:15 AM - Forum: N20 - No Replies

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

  This program reads the digital state of GPIO15 and GPIO16 on an ESP32
  and prints their state (HIGH or LOW) to the serial monitor every 500ms.
*/

#define PIN_GPIO15 15  // Define GPIO15
#define PIN_GPIO16 16  // Define GPIO16

void setup() {
  Serial.begin(115200);               // Initialize serial communication at 115200 baud
  pinMode(PIN_GPIO15, INPUT);         // Set GPIO15 as input
  pinMode(PIN_GPIO16, INPUT);         // Set GPIO16 as input
  Serial.println("ESP32 GPIO15 and GPIO16 State Monitor");
}

void loop() {
  int state15 = digitalRead(PIN_GPIO15);  // Read state of GPIO15
  int state16 = digitalRead(PIN_GPIO16);  // Read state of GPIO16

  // Print the state to the serial monitor
  Serial.print("GPIO15: ");
  Serial.print(state15 == HIGH ? "HIGH" : "LOW");
  Serial.print("  |  GPIO16: ");
  Serial.println(state16 == HIGH ? "HIGH" : "LOW");

  delay(500);  // Wait for 500 milliseconds before reading again
}
arduino ino file download:

.zip   1-free-gpio-state.zip (Size: 632 bytes / Downloads: 617)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   1-free-gpio-state.ino.merged.zip (Size: 181.39 KB / Downloads: 656)

Print this item

  [arduino code examples for N30]-01 Read digital input ports state
Posted by: admin - 08-03-2025, 03:15 AM - Forum: N30 - No Replies

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

  This program reads the digital state of GPIO15 and GPIO16 on an ESP32
  and prints their state (HIGH or LOW) to the serial monitor every 500ms.
*/

#define PIN_GPIO15 15  // Define GPIO15
#define PIN_GPIO16 16  // Define GPIO16

void setup() {
  Serial.begin(115200);               // Initialize serial communication at 115200 baud
  pinMode(PIN_GPIO15, INPUT);         // Set GPIO15 as input
  pinMode(PIN_GPIO16, INPUT);         // Set GPIO16 as input
  Serial.println("ESP32 GPIO15 and GPIO16 State Monitor");
}

void loop() {
  int state15 = digitalRead(PIN_GPIO15);  // Read state of GPIO15
  int state16 = digitalRead(PIN_GPIO16);  // Read state of GPIO16

  // Print the state to the serial monitor
  Serial.print("GPIO15: ");
  Serial.print(state15 == HIGH ? "HIGH" : "LOW");
  Serial.print("  |  GPIO16: ");
  Serial.println(state16 == HIGH ? "HIGH" : "LOW");

  delay(500);  // Wait for 500 milliseconds before reading again
}
arduino ino file download:

.zip   1-free-gpio-state.zip (Size: 632 bytes / Downloads: 604)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   1-free-gpio-state.ino.merged.zip (Size: 181.39 KB / Downloads: 611)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N60 - Replies (3)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 722)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N10 - Replies (1)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 666)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N20 - Replies (1)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 672)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N30 - Replies (1)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 612)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N10 - Replies (13)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 662)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N20 - Replies (3)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 712)

Print this item

  N60/N30/N20/N10 PC software for RS485 modbus connection
Posted by: admin - 08-03-2025, 03:07 AM - Forum: N30 - Replies (5)

connect PC to N60 by USB-RS485 adapter.
   
pc software download:

.zip   N60_APP.zip (Size: 1.66 MB / Downloads: 709)

Print this item

  Problem with ds18b20 on Port 1-3
Posted by: ubfox - 08-02-2025, 12:44 PM - Forum: KC868-A16v3 - Replies (1)

#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS 21

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress addr;

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("Starte Sensor-Test...");
  delay(500);
  sensors.begin();
  delay(5000);

  int count = sensors.getDeviceCount();
  Serial.printf("Gefundene Sensoren: %d\n", count);

  if (count == 0) {
    Serial.println("Keine Sensoren gefunden.");
    return;
  }

  for (int i = 0; i < count; i++) {
    if (sensors.getAddress(addr, i)) {
      Serial.print("Sensor-Adresse: ");
      for (uint8_t j = 0; j < 8; j++) {
        Serial.printf("%02X", addr[j]);
      }
      Serial.println();
    } else {
      Serial.printf("Sensor %d: Adresse nicht lesbar\n", i);
    }
  }
   
}

void loop() {
  Serial.println("Starte Sensor-Test1...");
  delay(5000);
}

This dos not work - why  

; PlatformIO Project Configuration File
;
;  Build options: build flags, source filter
;  Upload options: custom upload port, speed and extra flags
;  Library options: dependencies, extra library storages
;  Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32-s3-devkitm-1]
platform = espressif32
board = esp32-s3-devkitm-1
framework = arduino
monitor_speed = 115200 
monitor_auto = yes
monitor_rts = 0
monitor_dtr = 0

build_flags =
  -D ARDUINO_USB_MODE=1
  -D ARDUINO_USB_CDC_ON_BOOT=1

   
lib_deps =
  # RECOMMENDED
  # Accept new functionality in a backwards compatible manner and patches
 
  ;pstolarz/OneWireNg @ ^0.13.3
  paulstoffregen/OneWire @ ^2.3.8
  milesburton/DallasTemperature @ ^4.0.4

Print this item