<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Smart Home Automation Forum - KC868-A256]]></title>
		<link>https://www.kincony.com/forum/</link>
		<description><![CDATA[Smart Home Automation Forum - https://www.kincony.com/forum]]></description>
		<pubDate>Tue, 07 Jul 2026 15:47:50 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[A256 circuit diagram]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=4212</link>
			<pubDate>Wed, 31 Jan 2024 11:32:09 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=4212</guid>
			<description><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=3979" target="_blank" title="">A256.jpg</a> (Size: 2.96 MB / Downloads: 1129)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=3979" target="_blank" title="">A256.jpg</a> (Size: 2.96 MB / Downloads: 1129)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Arduino source code for KC868-A256]-05 RS485]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2720</link>
			<pubDate>Wed, 22 Mar 2023 09:05:46 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2720</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*/*WWW.KINCONY.COM*/<br />
/*KC868-A256 code of RS485 */<br />
void setup() {<br />
  Serial.begin(115200);<br />
  Serial2.begin(115200,SERIAL_8N1,13,14);//A256<br />
 &nbsp;&nbsp;Serial2.println("RS485 SEND is OK!!");<br />
 &nbsp;&nbsp;Serial2.println("******************");<br />
  <br />
}<br />
<br />
void loop() {<br />
  /*print the received data of RS485 port*/<br />
  while(Serial2.available()&gt;0)<br />
 &nbsp;&nbsp;{<br />
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it<br />
 &nbsp;&nbsp;}<br />
  delay(200);<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2177" target="_blank" title="">rs485.zip</a> (Size: 550 bytes / Downloads: 822)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*/*WWW.KINCONY.COM*/<br />
/*KC868-A256 code of RS485 */<br />
void setup() {<br />
  Serial.begin(115200);<br />
  Serial2.begin(115200,SERIAL_8N1,13,14);//A256<br />
 &nbsp;&nbsp;Serial2.println("RS485 SEND is OK!!");<br />
 &nbsp;&nbsp;Serial2.println("******************");<br />
  <br />
}<br />
<br />
void loop() {<br />
  /*print the received data of RS485 port*/<br />
  while(Serial2.available()&gt;0)<br />
 &nbsp;&nbsp;{<br />
    Serial2.print((char)Serial2.read());//Read rs485 receive data  and print it<br />
 &nbsp;&nbsp;}<br />
  delay(200);<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2177" target="_blank" title="">rs485.zip</a> (Size: 550 bytes / Downloads: 822)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Arduino source code for KC868-A256]-04 OUTPUT_256]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2719</link>
			<pubDate>Wed, 22 Mar 2023 09:05:12 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2719</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 KC868-256  press button S2,all leds will on one by one;<br />
            release the button,all leds will off one by one;<br />
*/<br />
<br />
int latchPin = 4;<br />
int clockPin = 16;<br />
int dataPin = 5;<br />
int button =0;<br />
<br />
void setup() <br />
{<br />
  pinMode(latchPin, OUTPUT);<br />
  pinMode(dataPin, OUTPUT);  <br />
  pinMode(clockPin, OUTPUT);<br />
  pinMode(button, INPUT);<br />
  <br />
}<br />
<br />
void loop() <br />
{<br />
if(digitalRead(button)==LOW){<br />
   &nbsp;&nbsp;<br />
   &nbsp;&nbsp;digitalWrite(dataPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, HIGH);<br />
   &nbsp;&nbsp;delay(100);<br />
}<br />
else {<br />
   &nbsp;&nbsp;digitalWrite(dataPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, HIGH);<br />
   &nbsp;&nbsp;delay(100);<br />
  }<br />
<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2176" target="_blank" title="">A256-output_256.zip</a> (Size: 635 bytes / Downloads: 764)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 KC868-256  press button S2,all leds will on one by one;<br />
            release the button,all leds will off one by one;<br />
*/<br />
<br />
int latchPin = 4;<br />
int clockPin = 16;<br />
int dataPin = 5;<br />
int button =0;<br />
<br />
void setup() <br />
{<br />
  pinMode(latchPin, OUTPUT);<br />
  pinMode(dataPin, OUTPUT);  <br />
  pinMode(clockPin, OUTPUT);<br />
  pinMode(button, INPUT);<br />
  <br />
}<br />
<br />
void loop() <br />
{<br />
if(digitalRead(button)==LOW){<br />
   &nbsp;&nbsp;<br />
   &nbsp;&nbsp;digitalWrite(dataPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, HIGH);<br />
   &nbsp;&nbsp;delay(100);<br />
}<br />
else {<br />
   &nbsp;&nbsp;digitalWrite(dataPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(clockPin,HIGH);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, LOW);<br />
   &nbsp;&nbsp;delay(10);<br />
   &nbsp;&nbsp;digitalWrite(latchPin, HIGH);<br />
   &nbsp;&nbsp;delay(100);<br />
  }<br />
<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2176" target="_blank" title="">A256-output_256.zip</a> (Size: 635 bytes / Downloads: 764)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Arduino source code for KC868-A256]-03 ETHERNET]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2718</link>
			<pubDate>Wed, 22 Mar 2023 09:03:32 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2718</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*KC868-A256 NETWORK TEST CODE*/<br />
<br />
#include &lt;ETH.h&gt; <br />
#include &lt;WiFiUdp.h&gt; <br />
<br />
#define ETH_ADDR        0<br />
#define ETH_POWER_PIN  -1<br />
#define ETH_MDC_PIN    23<br />
#define ETH_MDIO_PIN &nbsp;&nbsp;18 &nbsp;&nbsp;<br />
#define ETH_TYPE     &nbsp;&nbsp;ETH_PHY_LAN8720<br />
#define ETH_CLK_MODE &nbsp;&nbsp;ETH_CLOCK_GPIO17_OUT<br />
<br />
WiFiUDP Udp;                      //Create UDP object<br />
unsigned int localUdpPort = 4196; //local port<br />
<br />
// Set it based on the IP address of the router<br />
IPAddress local_ip(192, 168, 1, 200); <br />
IPAddress gateway(192, 168, 1, 1);<br />
IPAddress subnet(255, 255, 255, 0);<br />
IPAddress dns(192, 168, 1, 1);<br />
<br />
void setup()<br />
{<br />
  Serial.begin(115200);<br />
  Serial.println();<br />
 &nbsp;&nbsp;<br />
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH<br />
<br />
  // write confir for static IP, gateway,subnet,dns1,dns2<br />
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {<br />
    Serial.println("LAN8720 Configuration failed.");<br />
  }else{Serial.println("LAN8720 Configuration success.");}<br />
  Serial.println("Connected");<br />
  Serial.print("IP Address:");<br />
  Serial.println(ETH.localIP());<br />
<br />
  Udp.begin(localUdpPort); //begin UDP listener<br />
}<br />
<br />
void loop()<br />
{<br />
  int packetSize = Udp.parsePacket(); //get package size<br />
  if (packetSize)                   &nbsp;&nbsp;//if have received data<br />
  {<br />
    char buf[packetSize];<br />
    Udp.read(buf, packetSize); //read current data<br />
<br />
    Serial.println();<br />
    Serial.print("Received: ");<br />
    Serial.println(buf);<br />
    Serial.print("From IP: ");<br />
    Serial.println(Udp.remoteIP());<br />
    Serial.print("From Port: ");<br />
    Serial.println(Udp.remotePort());<br />
<br />
    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data<br />
    Udp.print("Received: ");    <br />
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer<br />
    Udp.endPacket();            //send data<br />
  }<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2175" target="_blank" title="">LAN8720_UDP.zip</a> (Size: 929 bytes / Downloads: 717)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*KC868-A256 NETWORK TEST CODE*/<br />
<br />
#include &lt;ETH.h&gt; <br />
#include &lt;WiFiUdp.h&gt; <br />
<br />
#define ETH_ADDR        0<br />
#define ETH_POWER_PIN  -1<br />
#define ETH_MDC_PIN    23<br />
#define ETH_MDIO_PIN &nbsp;&nbsp;18 &nbsp;&nbsp;<br />
#define ETH_TYPE     &nbsp;&nbsp;ETH_PHY_LAN8720<br />
#define ETH_CLK_MODE &nbsp;&nbsp;ETH_CLOCK_GPIO17_OUT<br />
<br />
WiFiUDP Udp;                      //Create UDP object<br />
unsigned int localUdpPort = 4196; //local port<br />
<br />
// Set it based on the IP address of the router<br />
IPAddress local_ip(192, 168, 1, 200); <br />
IPAddress gateway(192, 168, 1, 1);<br />
IPAddress subnet(255, 255, 255, 0);<br />
IPAddress dns(192, 168, 1, 1);<br />
<br />
void setup()<br />
{<br />
  Serial.begin(115200);<br />
  Serial.println();<br />
 &nbsp;&nbsp;<br />
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH<br />
<br />
  // write confir for static IP, gateway,subnet,dns1,dns2<br />
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {<br />
    Serial.println("LAN8720 Configuration failed.");<br />
  }else{Serial.println("LAN8720 Configuration success.");}<br />
  Serial.println("Connected");<br />
  Serial.print("IP Address:");<br />
  Serial.println(ETH.localIP());<br />
<br />
  Udp.begin(localUdpPort); //begin UDP listener<br />
}<br />
<br />
void loop()<br />
{<br />
  int packetSize = Udp.parsePacket(); //get package size<br />
  if (packetSize)                   &nbsp;&nbsp;//if have received data<br />
  {<br />
    char buf[packetSize];<br />
    Udp.read(buf, packetSize); //read current data<br />
<br />
    Serial.println();<br />
    Serial.print("Received: ");<br />
    Serial.println(buf);<br />
    Serial.print("From IP: ");<br />
    Serial.println(Udp.remoteIP());<br />
    Serial.print("From Port: ");<br />
    Serial.println(Udp.remotePort());<br />
<br />
    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data<br />
    Udp.print("Received: ");    <br />
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer<br />
    Udp.endPacket();            //send data<br />
  }<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2175" target="_blank" title="">LAN8720_UDP.zip</a> (Size: 929 bytes / Downloads: 717)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Arduino source code for KC868-A256]-02 INPUT_256]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2717</link>
			<pubDate>Wed, 22 Mar 2023 09:02:40 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2717</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * KC868-256 INPUT CODE<br />
  74HC165 Shift register input example<br />
*/<br />
const byte latchPin = 33;        <br />
const byte clockPin = 32;     &nbsp;&nbsp;<br />
const byte dataPin = 15;        <br />
<br />
 <br />
const int numBits = 8; &nbsp;&nbsp;<br />
 <br />
void setup() {<br />
  Serial.begin(115200);<br />
  pinMode(dataPin, INPUT);<br />
  pinMode(clockPin, OUTPUT);<br />
  pinMode(latchPin, OUTPUT);<br />
}<br />
 <br />
void loop() {<br />
<br />
  digitalWrite(latchPin, LOW);<br />
  digitalWrite(latchPin, HIGH);<br />
  for(int j =0;j&lt;=255;j+=8)<br />
  {<br />
    for (int i = numBits; i &gt;0; i--) {<br />
    int bit = digitalRead(dataPin);<br />
    if (bit == LOW) {<br />
      Serial.printf("Input %d is DOWN&#92;n",i+j);<br />
    } <br />
    digitalWrite(clockPin, HIGH); <br />
    digitalWrite(clockPin, LOW);<br />
  }<br />
  }<br />
 }</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2174" target="_blank" title="">KC868-256_input_256.zip</a> (Size: 796 bytes / Downloads: 747)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * KC868-256 INPUT CODE<br />
  74HC165 Shift register input example<br />
*/<br />
const byte latchPin = 33;        <br />
const byte clockPin = 32;     &nbsp;&nbsp;<br />
const byte dataPin = 15;        <br />
<br />
 <br />
const int numBits = 8; &nbsp;&nbsp;<br />
 <br />
void setup() {<br />
  Serial.begin(115200);<br />
  pinMode(dataPin, INPUT);<br />
  pinMode(clockPin, OUTPUT);<br />
  pinMode(latchPin, OUTPUT);<br />
}<br />
 <br />
void loop() {<br />
<br />
  digitalWrite(latchPin, LOW);<br />
  digitalWrite(latchPin, HIGH);<br />
  for(int j =0;j&lt;=255;j+=8)<br />
  {<br />
    for (int i = numBits; i &gt;0; i--) {<br />
    int bit = digitalRead(dataPin);<br />
    if (bit == LOW) {<br />
      Serial.printf("Input %d is DOWN&#92;n",i+j);<br />
    } <br />
    digitalWrite(clockPin, HIGH); <br />
    digitalWrite(clockPin, LOW);<br />
  }<br />
  }<br />
 }</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2174" target="_blank" title="">KC868-256_input_256.zip</a> (Size: 796 bytes / Downloads: 747)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[Arduino source code for KC868-A256]-01 ADC_INOUT]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2716</link>
			<pubDate>Wed, 22 Mar 2023 09:01:36 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=194">KinCony Support</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2716</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*ADC Code for KC868-A256*/<br />
#include "Arduino.h"<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;36        // IO36  <br />
#define ANALOG_A2 &nbsp;&nbsp;39        // IO39    <br />
#define ANALOG_A3 &nbsp;&nbsp;34        // IO34 &nbsp;&nbsp;<br />
#define ANALOG_A4 &nbsp;&nbsp;35        // IO35 &nbsp;&nbsp;<br />
void setup()<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;Serial.begin(115200);<br />
&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<br />
<br />
  pinMode(ANALOG_A1,INPUT);<br />
  pinMode(ANALOG_A2,INPUT);<br />
  pinMode(ANALOG_A3,INPUT);<br />
  pinMode(ANALOG_A4,INPUT);<br />
}<br />
<br />
void loop()<br />
{<br />
  if(analogRead(ANALOG_A1)!=0)<br />
    {  Serial.printf("A1 on Pin(%d)=%d&#92;n",ANALOG_A1,analogRead(ANALOG_A1));delay(500);}<br />
  if(analogRead(ANALOG_A2)!=0)<br />
    {  Serial.printf("A2 on Pin(%d)=%d&#92;n",ANALOG_A2,analogRead(ANALOG_A2));delay(500);}<br />
  if(analogRead(ANALOG_A3)!=0)<br />
    {  Serial.printf("A3 on Pin(%d)=%d&#92;n",ANALOG_A3,analogRead(ANALOG_A3));delay(500);}<br />
  if(analogRead(ANALOG_A4)!=0)<br />
    {  Serial.printf("A4 on Pin(%d)=%d&#92;n",ANALOG_A4,analogRead(ANALOG_A4));delay(500);}<br />
<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2173" target="_blank" title="">KC868-256_ADC_INOUT.zip</a> (Size: 681 bytes / Downloads: 699)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*ADC Code for KC868-A256*/<br />
#include "Arduino.h"<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;36        // IO36  <br />
#define ANALOG_A2 &nbsp;&nbsp;39        // IO39    <br />
#define ANALOG_A3 &nbsp;&nbsp;34        // IO34 &nbsp;&nbsp;<br />
#define ANALOG_A4 &nbsp;&nbsp;35        // IO35 &nbsp;&nbsp;<br />
void setup()<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;Serial.begin(115200);<br />
&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<br />
<br />
  pinMode(ANALOG_A1,INPUT);<br />
  pinMode(ANALOG_A2,INPUT);<br />
  pinMode(ANALOG_A3,INPUT);<br />
  pinMode(ANALOG_A4,INPUT);<br />
}<br />
<br />
void loop()<br />
{<br />
  if(analogRead(ANALOG_A1)!=0)<br />
    {  Serial.printf("A1 on Pin(%d)=%d&#92;n",ANALOG_A1,analogRead(ANALOG_A1));delay(500);}<br />
  if(analogRead(ANALOG_A2)!=0)<br />
    {  Serial.printf("A2 on Pin(%d)=%d&#92;n",ANALOG_A2,analogRead(ANALOG_A2));delay(500);}<br />
  if(analogRead(ANALOG_A3)!=0)<br />
    {  Serial.printf("A3 on Pin(%d)=%d&#92;n",ANALOG_A3,analogRead(ANALOG_A3));delay(500);}<br />
  if(analogRead(ANALOG_A4)!=0)<br />
    {  Serial.printf("A4 on Pin(%d)=%d&#92;n",ANALOG_A4,analogRead(ANALOG_A4));delay(500);}<br />
<br />
}</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/zip.png" title="ZIP File" border="0" alt=".zip" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2173" target="_blank" title="">KC868-256_ADC_INOUT.zip</a> (Size: 681 bytes / Downloads: 699)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KC868-A256 configure yaml for ESPhome]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2697</link>
			<pubDate>Thu, 16 Mar 2023 13:46:27 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2697</guid>
			<description><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2135" target="_blank" title="">HA_A256_small.png</a> (Size: 82.06 KB / Downloads: 1921)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2134" target="_blank" title="">HA_A256.txt</a> (Size: 74.43 KB / Downloads: 1190)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2135" target="_blank" title="">HA_A256_small.png</a> (Size: 82.06 KB / Downloads: 1921)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=2134" target="_blank" title="">HA_A256.txt</a> (Size: 74.43 KB / Downloads: 1190)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KC868-A256 ESP32 I/O pin define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=2696</link>
			<pubDate>Thu, 16 Mar 2023 13:42:50 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=2696</guid>
			<description><![CDATA[#define ANALOG_A1  GPIO36<br />
#define ANALOG_A2  GPIO39<br />
#define ANALOG_A3  GPIO34<br />
#define ANALOG_A4  GPIO35<br />
<br />
Ethernet (LAN8720) I/O define:<br />
<br />
#define ETH_ADDR        0<br />
#define ETH_POWER_PIN  -1<br />
#define ETH_MDC_PIN    23<br />
#define ETH_MDIO_PIN  18<br />
#define ETH_TYPE      ETH_PHY_LAN8720<br />
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT<br />
<br />
RS485: <br />
RXD:GPIO13<br />
TXD:GPIO14<br />
<br />
74HC595 for output:<br />
Data: GPIO5<br />
Clock:GPIO16<br />
Latch:GPIO4<br />
<br />
74HC165 for input:<br />
<br />
Data: GPIO15<br />
Clock: GPIO32<br />
LD(load_pin): GPIO33]]></description>
			<content:encoded><![CDATA[#define ANALOG_A1  GPIO36<br />
#define ANALOG_A2  GPIO39<br />
#define ANALOG_A3  GPIO34<br />
#define ANALOG_A4  GPIO35<br />
<br />
Ethernet (LAN8720) I/O define:<br />
<br />
#define ETH_ADDR        0<br />
#define ETH_POWER_PIN  -1<br />
#define ETH_MDC_PIN    23<br />
#define ETH_MDIO_PIN  18<br />
#define ETH_TYPE      ETH_PHY_LAN8720<br />
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT<br />
<br />
RS485: <br />
RXD:GPIO13<br />
TXD:GPIO14<br />
<br />
74HC595 for output:<br />
Data: GPIO5<br />
Clock:GPIO16<br />
Latch:GPIO4<br />
<br />
74HC165 for input:<br />
<br />
Data: GPIO15<br />
Clock: GPIO32<br />
LD(load_pin): GPIO33]]></content:encoded>
		</item>
	</channel>
</rss>