<?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 - AIO Hybrid]]></title>
		<link>https://www.kincony.com/forum/</link>
		<description><![CDATA[Smart Home Automation Forum - https://www.kincony.com/forum]]></description>
		<pubDate>Tue, 19 May 2026 03:38:21 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[AIO Hybrid Smart Controller ESP32 system block diagram]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=9289</link>
			<pubDate>Fri, 24 Apr 2026 14:58:58 +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=9289</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=9675" target="_blank" title="">KinCony-AIO-Hybrid-Smart-Controller-Diagram.png.png</a> (Size: 879.54 KB / Downloads: 80)
<!-- 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=9675" target="_blank" title="">KinCony-AIO-Hybrid-Smart-Controller-Diagram.png.png</a> (Size: 879.54 KB / Downloads: 80)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[AIO Hybrid wiring diagram]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=9211</link>
			<pubDate>Sun, 05 Apr 2026 13:45:23 +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=9211</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=9530" target="_blank" title="">aio-hybird-diagram.JPG</a> (Size: 113.02 KB / Downloads: 87)
<!-- 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=9530" target="_blank" title="">aio-hybird-diagram.JPG</a> (Size: 113.02 KB / Downloads: 87)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Battery backup model on AOI]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=9125</link>
			<pubDate>Mon, 16 Mar 2026 17:42:54 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=10472">H_spadacini</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=9125</guid>
			<description><![CDATA[<span style="text-decoration: underline;" class="mycode_u">Francais </span>: <br />
Serait-il possible de connaitre la référence de la pile bouton qui doit va dans le rtc battery socket  qui peut-être mis sur le AIO pour maintenir sa sauvegarde.<br />
Cordialement.<br />
<br />
<span style="font-size: small;" class="mycode_size"><span style="color: #3c4043;" class="mycode_color"><span style="font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;" class="mycode_font"><span style="text-decoration: underline;" class="mycode_u">English</span> :<br />
 Could you please provide the part number for the button cell battery that fits into the RTC battery socket, which can be installed on the AIO to maintain its backup?</span><span style="font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;" class="mycode_font"><br />
Regards.</span></span> </span>]]></description>
			<content:encoded><![CDATA[<span style="text-decoration: underline;" class="mycode_u">Francais </span>: <br />
Serait-il possible de connaitre la référence de la pile bouton qui doit va dans le rtc battery socket  qui peut-être mis sur le AIO pour maintenir sa sauvegarde.<br />
Cordialement.<br />
<br />
<span style="font-size: small;" class="mycode_size"><span style="color: #3c4043;" class="mycode_color"><span style="font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;" class="mycode_font"><span style="text-decoration: underline;" class="mycode_u">English</span> :<br />
 Could you please provide the part number for the button cell battery that fits into the RTC battery socket, which can be installed on the AIO to maintain its backup?</span><span style="font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif;" class="mycode_font"><br />
Regards.</span></span> </span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Inputs]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8567</link>
			<pubDate>Thu, 18 Sep 2025 16:41:30 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=9452">Jan_W</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8567</guid>
			<description><![CDATA[Why does it have so few dry-contact inputs? only 12 ...<br />
old ESP32 AIO has 56<br />
<br />
Is there any option to increase this and have external inputs available in one KCS v3 configuration (to use any input from outsite AIO Hybrid in AIO Hybrid IFTTT)?]]></description>
			<content:encoded><![CDATA[Why does it have so few dry-contact inputs? only 12 ...<br />
old ESP32 AIO has 56<br />
<br />
Is there any option to increase this and have external inputs available in one KCS v3 configuration (to use any input from outsite AIO Hybrid in AIO Hybrid IFTTT)?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-13 RF433M receiver]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8547</link>
			<pubDate>Mon, 15 Sep 2025 09:40:56 +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=8547</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
  Simple example for receiving<br />
  <br />
  https://github.com/sui77/rc-switch/<br />
*/<br />
<br />
#include &lt;RCSwitch.h&gt;<br />
<br />
RCSwitch mySwitch = RCSwitch();<br />
<br />
void setup() {<br />
  Serial.begin(9600);<br />
  mySwitch.enableReceive(digitalPinToInterrupt(40)); <br />
  Serial.print("begin test");<br />
}<br />
<br />
void loop() {<br />
  if (mySwitch.available()) {<br />
    <br />
    Serial.print("Received ");<br />
    Serial.print( mySwitch.getReceivedValue() );<br />
    Serial.print(" / ");<br />
    Serial.print( mySwitch.getReceivedBitlength() );<br />
    Serial.print("bit ");<br />
    Serial.print("Protocol: ");<br />
    Serial.println( mySwitch.getReceivedProtocol() );<br />
<br />
    mySwitch.resetAvailable();<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8347" target="_blank" title="">13-433-decode.zip</a> (Size: 457 bytes / Downloads: 341)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8348" target="_blank" title="">13-433-decode.ino.merged.zip</a> (Size: 185.99 KB / Downloads: 352)
<!-- end: postbit_attachments_attachment --><br />
<!-- 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=8349" target="_blank" title="">arduino.png</a> (Size: 131.43 KB / Downloads: 346)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
  Simple example for receiving<br />
  <br />
  https://github.com/sui77/rc-switch/<br />
*/<br />
<br />
#include &lt;RCSwitch.h&gt;<br />
<br />
RCSwitch mySwitch = RCSwitch();<br />
<br />
void setup() {<br />
  Serial.begin(9600);<br />
  mySwitch.enableReceive(digitalPinToInterrupt(40)); <br />
  Serial.print("begin test");<br />
}<br />
<br />
void loop() {<br />
  if (mySwitch.available()) {<br />
    <br />
    Serial.print("Received ");<br />
    Serial.print( mySwitch.getReceivedValue() );<br />
    Serial.print(" / ");<br />
    Serial.print( mySwitch.getReceivedBitlength() );<br />
    Serial.print("bit ");<br />
    Serial.print("Protocol: ");<br />
    Serial.println( mySwitch.getReceivedProtocol() );<br />
<br />
    mySwitch.resetAvailable();<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8347" target="_blank" title="">13-433-decode.zip</a> (Size: 457 bytes / Downloads: 341)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8348" target="_blank" title="">13-433-decode.ino.merged.zip</a> (Size: 185.99 KB / Downloads: 352)
<!-- end: postbit_attachments_attachment --><br />
<!-- 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=8349" target="_blank" title="">arduino.png</a> (Size: 131.43 KB / Downloads: 346)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-12 DAC MCP4728 analog output]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8546</link>
			<pubDate>Mon, 15 Sep 2025 09:39:36 +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=8546</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// Basic demo for configuring the MCP4728 4-Channel 12-bit I2C DAC<br />
#include &lt;Adafruit_MCP4728.h&gt;<br />
#include &lt;Wire.h&gt;<br />
<br />
// I2C pin definitions<br />
#define I2C_SDA 8<br />
#define I2C_SCL 18<br />
<br />
Adafruit_MCP4728 mcp;<br />
<br />
void setup(void) {<br />
  Serial.begin(115200);<br />
  while (!Serial)<br />
    delay(10); // will pause Zero, Leonardo, etc until serial console opens<br />
<br />
  Serial.println("Adafruit MCP4728 test!");<br />
<br />
  Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
  // Try to initialize!<br />
  if (!mcp.begin()) {<br />
    Serial.println("Failed to find MCP4728 chip");<br />
    while (1) {<br />
      delay(10);<br />
    }<br />
  }<br />
<br />
  mcp.setChannelValue(MCP4728_CHANNEL_A, 4095);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_B, 2048);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_C, 1024);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_D, 0);<br />
}<br />
<br />
void loop() { delay(1000); }</code></div></div> arduino ino file download: <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=8345" target="_blank" title="">12-DAC-MCP4728.zip</a> (Size: 566 bytes / Downloads: 339)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8346" target="_blank" title="">12-DAC-MCP4728.ino.merged.zip</a> (Size: 198.76 KB / Downloads: 346)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// Basic demo for configuring the MCP4728 4-Channel 12-bit I2C DAC<br />
#include &lt;Adafruit_MCP4728.h&gt;<br />
#include &lt;Wire.h&gt;<br />
<br />
// I2C pin definitions<br />
#define I2C_SDA 8<br />
#define I2C_SCL 18<br />
<br />
Adafruit_MCP4728 mcp;<br />
<br />
void setup(void) {<br />
  Serial.begin(115200);<br />
  while (!Serial)<br />
    delay(10); // will pause Zero, Leonardo, etc until serial console opens<br />
<br />
  Serial.println("Adafruit MCP4728 test!");<br />
<br />
  Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
  // Try to initialize!<br />
  if (!mcp.begin()) {<br />
    Serial.println("Failed to find MCP4728 chip");<br />
    while (1) {<br />
      delay(10);<br />
    }<br />
  }<br />
<br />
  mcp.setChannelValue(MCP4728_CHANNEL_A, 4095);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_B, 2048);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_C, 1024);<br />
  mcp.setChannelValue(MCP4728_CHANNEL_D, 0);<br />
}<br />
<br />
void loop() { delay(1000); }</code></div></div> arduino ino file download: <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=8345" target="_blank" title="">12-DAC-MCP4728.zip</a> (Size: 566 bytes / Downloads: 339)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8346" target="_blank" title="">12-DAC-MCP4728.ino.merged.zip</a> (Size: 198.76 KB / Downloads: 346)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-11 IR send and receive]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8545</link>
			<pubDate>Mon, 15 Sep 2025 09:37:32 +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=8545</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * SimpleReceiver.cpp<br />
 *<br />
 * Demonstrates receiving ONLY NEC protocol IR codes with IRremote<br />
 * If no protocol is defined, all protocols (except Bang&amp;Olufsen) are active.<br />
 *<br />
 *  This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.<br />
 *<br />
 ************************************************************************************<br />
 * MIT License<br />
 *<br />
 * Copyright (c) 2020-2025 Armin Joachimsmeyer<br />
 *<br />
 * Permission is hereby granted, free of charge, to any person obtaining a copy<br />
 * of this software and associated documentation files (the "Software"), to deal<br />
 * in the Software without restriction, including without limitation the rights<br />
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br />
 * copies of the Software, and to permit persons to whom the Software is furnished<br />
 * to do so, subject to the following conditions:<br />
 *<br />
 * The above copyright notice and this permission notice shall be included in all<br />
 * copies or substantial portions of the Software.<br />
 *<br />
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,<br />
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A<br />
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT<br />
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF<br />
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE<br />
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br />
 *<br />
 ************************************************************************************<br />
 */<br />
<br />
#include &lt;Arduino.h&gt;<br />
#include &lt;IRremote.hpp&gt; // include the library<br />
<br />
<br />
uint8_t receiver_pin = 17;<br />
<br />
void setup() {<br />
    Serial.begin(115200);<br />
    IrReceiver.begin(receiver_pin, false);<br />
}<br />
<br />
void loop() {<br />
  if (IrReceiver.decode()) {<br />
      Serial.println("recv data");<br />
      if (IrReceiver.decodedIRData.protocol == UNKNOWN) {<br />
          Serial.println(F("Received noise or an unknown (or not yet enabled) protocol"));<br />
          // We have an unknown protocol here, print extended info<br />
          IrReceiver.printIRResultRawFormatted(&amp;Serial, true);<br />
<br />
          IrReceiver.resume(); // Do it here, to preserve raw data for printing with printIRResultRawFormatted()<br />
      } else {<br />
          IrReceiver.resume(); // Early enable receiving of the next IR frame<br />
<br />
          IrReceiver.printIRResultShort(&amp;Serial);<br />
          IrReceiver.printIRSendUsage(&amp;Serial);<br />
      }<br />
  } else {<br />
    // Serial.println("no data");<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8343" target="_blank" title="">11-SimpleSendReceiver.zip</a> (Size: 1.31 KB / Downloads: 361)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8344" target="_blank" title="">11-SimpleSendReceiver.ino.merged.zip</a> (Size: 197.43 KB / Downloads: 340)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * SimpleReceiver.cpp<br />
 *<br />
 * Demonstrates receiving ONLY NEC protocol IR codes with IRremote<br />
 * If no protocol is defined, all protocols (except Bang&amp;Olufsen) are active.<br />
 *<br />
 *  This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.<br />
 *<br />
 ************************************************************************************<br />
 * MIT License<br />
 *<br />
 * Copyright (c) 2020-2025 Armin Joachimsmeyer<br />
 *<br />
 * Permission is hereby granted, free of charge, to any person obtaining a copy<br />
 * of this software and associated documentation files (the "Software"), to deal<br />
 * in the Software without restriction, including without limitation the rights<br />
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br />
 * copies of the Software, and to permit persons to whom the Software is furnished<br />
 * to do so, subject to the following conditions:<br />
 *<br />
 * The above copyright notice and this permission notice shall be included in all<br />
 * copies or substantial portions of the Software.<br />
 *<br />
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,<br />
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A<br />
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT<br />
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF<br />
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE<br />
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br />
 *<br />
 ************************************************************************************<br />
 */<br />
<br />
#include &lt;Arduino.h&gt;<br />
#include &lt;IRremote.hpp&gt; // include the library<br />
<br />
<br />
uint8_t receiver_pin = 17;<br />
<br />
void setup() {<br />
    Serial.begin(115200);<br />
    IrReceiver.begin(receiver_pin, false);<br />
}<br />
<br />
void loop() {<br />
  if (IrReceiver.decode()) {<br />
      Serial.println("recv data");<br />
      if (IrReceiver.decodedIRData.protocol == UNKNOWN) {<br />
          Serial.println(F("Received noise or an unknown (or not yet enabled) protocol"));<br />
          // We have an unknown protocol here, print extended info<br />
          IrReceiver.printIRResultRawFormatted(&amp;Serial, true);<br />
<br />
          IrReceiver.resume(); // Do it here, to preserve raw data for printing with printIRResultRawFormatted()<br />
      } else {<br />
          IrReceiver.resume(); // Early enable receiving of the next IR frame<br />
<br />
          IrReceiver.printIRResultShort(&amp;Serial);<br />
          IrReceiver.printIRSendUsage(&amp;Serial);<br />
      }<br />
  } else {<br />
    // Serial.println("no data");<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8343" target="_blank" title="">11-SimpleSendReceiver.zip</a> (Size: 1.31 KB / Downloads: 361)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8344" target="_blank" title="">11-SimpleSendReceiver.ino.merged.zip</a> (Size: 197.43 KB / Downloads: 340)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-10 Print TEXT on SSD1306 OLED displayer]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8544</link>
			<pubDate>Mon, 15 Sep 2025 09:36:28 +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=8544</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 * <br />
 * This Arduino program demonstrates how to display text on an SSD1306 128x64 OLED display using the U8g2 library.<br />
 * The program draws two lines of text on the display:<br />
 * - The first line is "KINCONY" in a larger font.<br />
 * - The second line is "www.kincony.com" in a smaller font.<br />
 * <br />
 * The display is connected via I2C (software implementation) with:<br />
 * - SCL (clock) on pin IO18<br />
 * - SDA (data) on pin IO8<br />
 * <br />
 * The display's I2C address is set to 0x3C.<br />
 */<br />
<br />
#include &lt;U8g2lib.h&gt;  // Include the U8g2 library for controlling the OLED display<br />
#include &lt;Wire.h&gt;   &nbsp;&nbsp;// Include the Wire library for I2C communication<br />
<br />
// Initialize the display using the software I2C method (SCL = IO18, SDA = IO8)<br />
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  18, 8, U8X8_PIN_NONE);  // Screen rotation: U8G2_R0<br />
<br />
// Function to display page 1 content<br />
void page1() {<br />
  // Set font size 18 for the larger "KINCONY" text<br />
  u8g2.setFont(u8g2_font_timR18_tf);  // Use the Times Roman font, size 18<br />
  u8g2.setFontPosTop();             &nbsp;&nbsp;// Set the text position at the top of the display<br />
  u8g2.setCursor(5, 0);             &nbsp;&nbsp;// Position the cursor at coordinates (5, 0)<br />
  u8g2.print("KINCONY");              // Display the text "KINCONY" on the screen<br />
<br />
  // Set font size 12 for the smaller "www.kincony.com" text<br />
  u8g2.setFont(u8g2_font_timR12_tf);  // Use the Times Roman font, size 12<br />
  u8g2.setCursor(0, 40);              // Position the cursor at coordinates (0, 40)<br />
  u8g2.print("www.kincony.com");      // Display the text "www.kincony.com"<br />
}<br />
<br />
// Setup function, runs once when the program starts<br />
void setup() {<br />
  // Set the I2C address for the display to 0x3C<br />
  u8g2.setI2CAddress(0x3C*2);  // I2C address shift for 8-bit format<br />
  <br />
  // Initialize the display<br />
  u8g2.begin();<br />
  <br />
  // Enable UTF-8 character printing for the display<br />
  u8g2.enableUTF8Print();  // Allow UTF-8 encoded text to be printed<br />
}<br />
<br />
// Main loop function, continuously runs after setup()<br />
void loop() {<br />
  // Begin the display drawing process<br />
  u8g2.firstPage();  // Prepare the first page for drawing<br />
  do {<br />
    // Call the page1() function to draw content on the display<br />
    page1();<br />
  } while (u8g2.nextPage());  // Continue to the next page until all pages are drawn<br />
}</code></div></div> arduino ino file download: <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=8341" target="_blank" title="">10-oled-ssd1306.zip</a> (Size: 1.11 KB / Downloads: 357)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8342" target="_blank" title="">10-oled-ssd1306.ino.merged.zip</a> (Size: 201.24 KB / Downloads: 328)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 * <br />
 * This Arduino program demonstrates how to display text on an SSD1306 128x64 OLED display using the U8g2 library.<br />
 * The program draws two lines of text on the display:<br />
 * - The first line is "KINCONY" in a larger font.<br />
 * - The second line is "www.kincony.com" in a smaller font.<br />
 * <br />
 * The display is connected via I2C (software implementation) with:<br />
 * - SCL (clock) on pin IO18<br />
 * - SDA (data) on pin IO8<br />
 * <br />
 * The display's I2C address is set to 0x3C.<br />
 */<br />
<br />
#include &lt;U8g2lib.h&gt;  // Include the U8g2 library for controlling the OLED display<br />
#include &lt;Wire.h&gt;   &nbsp;&nbsp;// Include the Wire library for I2C communication<br />
<br />
// Initialize the display using the software I2C method (SCL = IO18, SDA = IO8)<br />
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  18, 8, U8X8_PIN_NONE);  // Screen rotation: U8G2_R0<br />
<br />
// Function to display page 1 content<br />
void page1() {<br />
  // Set font size 18 for the larger "KINCONY" text<br />
  u8g2.setFont(u8g2_font_timR18_tf);  // Use the Times Roman font, size 18<br />
  u8g2.setFontPosTop();             &nbsp;&nbsp;// Set the text position at the top of the display<br />
  u8g2.setCursor(5, 0);             &nbsp;&nbsp;// Position the cursor at coordinates (5, 0)<br />
  u8g2.print("KINCONY");              // Display the text "KINCONY" on the screen<br />
<br />
  // Set font size 12 for the smaller "www.kincony.com" text<br />
  u8g2.setFont(u8g2_font_timR12_tf);  // Use the Times Roman font, size 12<br />
  u8g2.setCursor(0, 40);              // Position the cursor at coordinates (0, 40)<br />
  u8g2.print("www.kincony.com");      // Display the text "www.kincony.com"<br />
}<br />
<br />
// Setup function, runs once when the program starts<br />
void setup() {<br />
  // Set the I2C address for the display to 0x3C<br />
  u8g2.setI2CAddress(0x3C*2);  // I2C address shift for 8-bit format<br />
  <br />
  // Initialize the display<br />
  u8g2.begin();<br />
  <br />
  // Enable UTF-8 character printing for the display<br />
  u8g2.enableUTF8Print();  // Allow UTF-8 encoded text to be printed<br />
}<br />
<br />
// Main loop function, continuously runs after setup()<br />
void loop() {<br />
  // Begin the display drawing process<br />
  u8g2.firstPage();  // Prepare the first page for drawing<br />
  do {<br />
    // Call the page1() function to draw content on the display<br />
    page1();<br />
  } while (u8g2.nextPage());  // Continue to the next page until all pages are drawn<br />
}</code></div></div> arduino ino file download: <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=8341" target="_blank" title="">10-oled-ssd1306.zip</a> (Size: 1.11 KB / Downloads: 357)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8342" target="_blank" title="">10-oled-ssd1306.ino.merged.zip</a> (Size: 201.24 KB / Downloads: 328)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-09 how to communication with Tuya Zigbee modul]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8543</link>
			<pubDate>Mon, 15 Sep 2025 09:35:29 +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=8543</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define TUYA_RXD 15<br />
#define TUYA_TXD 48<br />
<br />
void setup() {<br />
  Serial0.begin(115200);  // Serial0<br />
  while (!Serial0);<br />
<br />
  Serial2.begin(115200, SERIAL_8N1, TUYA_RXD, TUYA_TXD);<br />
  delay(100);<br />
<br />
  byte tuya_cmd[] = {0x55, 0xAA, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04};<br />
  Serial0.println("send data to Tuya module:");<br />
  for (int i = 0; i &lt; sizeof(tuya_cmd); i++) {<br />
    Serial0.printf("%02X ", tuya_cmd[i]);<br />
    Serial2.write(tuya_cmd[i]);<br />
  }<br />
  Serial0.println();<br />
}<br />
<br />
void loop() {<br />
  if (Serial2.available()) {<br />
    Serial0.print("received from tuya: ");<br />
    while (Serial2.available()) {<br />
      byte b = Serial2.read();<br />
      Serial0.printf("%02X ", b);<br />
    }<br />
    Serial0.println();<br />
  }<br />
<br />
  delay(100);<br />
}</code></div></div> arduino ino file download: <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=8339" target="_blank" title="">9-Zigbee-ZSU.zip</a> (Size: 496 bytes / Downloads: 318)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8340" target="_blank" title="">9-Zigbee-ZSU.ino.merged.zip</a> (Size: 190.24 KB / Downloads: 324)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#define TUYA_RXD 15<br />
#define TUYA_TXD 48<br />
<br />
void setup() {<br />
  Serial0.begin(115200);  // Serial0<br />
  while (!Serial0);<br />
<br />
  Serial2.begin(115200, SERIAL_8N1, TUYA_RXD, TUYA_TXD);<br />
  delay(100);<br />
<br />
  byte tuya_cmd[] = {0x55, 0xAA, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04};<br />
  Serial0.println("send data to Tuya module:");<br />
  for (int i = 0; i &lt; sizeof(tuya_cmd); i++) {<br />
    Serial0.printf("%02X ", tuya_cmd[i]);<br />
    Serial2.write(tuya_cmd[i]);<br />
  }<br />
  Serial0.println();<br />
}<br />
<br />
void loop() {<br />
  if (Serial2.available()) {<br />
    Serial0.print("received from tuya: ");<br />
    while (Serial2.available()) {<br />
      byte b = Serial2.read();<br />
      Serial0.printf("%02X ", b);<br />
    }<br />
    Serial0.println();<br />
  }<br />
<br />
  delay(100);<br />
}</code></div></div> arduino ino file download: <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=8339" target="_blank" title="">9-Zigbee-ZSU.zip</a> (Size: 496 bytes / Downloads: 318)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8340" target="_blank" title="">9-Zigbee-ZSU.ino.merged.zip</a> (Size: 190.24 KB / Downloads: 324)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-08 Ethernet W5500 chip work with TCP Server mo]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8542</link>
			<pubDate>Mon, 15 Sep 2025 09:32:38 +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=8542</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * This Arduino program sets up an ESP32-S3 with a W5500 Ethernet module<br />
 * as a TCP server. It listens on port 4196 and echoes back any string <br />
 * received from a client.<br />
 *<br />
 * Hardware connections:<br />
 * - CLK: GPIO42<br />
 * - MOSI: GPIO43<br />
 * - MISO: GPIO44<br />
 * - CS: GPIO41<br />
 * - RST: GPIO1<br />
 * - INT: GPIO2<br />
 *<br />
 * Static IP address: 192.168.3.55<br />
 * Subnet Mask: 255.255.255.0<br />
 * Gateway: 192.168.3.1<br />
 * DNS: 192.168.3.1<br />
 */<br />
<br />
#include &lt;SPI.h&gt;<br />
#include &lt;Ethernet.h&gt;<br />
<br />
// Define the W5500 Ethernet module pins<br />
#define W5500_CS_PIN  41<br />
#define W5500_RST_PIN 1<br />
#define W5500_INT_PIN 2<br />
#define W5500_CLK_PIN 42<br />
#define W5500_MOSI_PIN 43<br />
#define W5500_MISO_PIN 44<br />
<br />
// MAC address for your Ethernet shield (must be unique on your network)<br />
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br />
<br />
// Static IP address configuration<br />
IPAddress ip(192, 168, 3, 55);     &nbsp;&nbsp;// Static IP address<br />
IPAddress subnet(255, 255, 255, 0); &nbsp;&nbsp;// Subnet mask<br />
IPAddress gateway(192, 168, 3, 1);    // Default gateway<br />
IPAddress dns(192, 168, 3, 1);        // DNS server address<br />
<br />
// Create an EthernetServer object to handle TCP connections<br />
EthernetServer server(4196);<br />
<br />
void setup() {<br />
  // Initialize serial communication<br />
  Serial.begin(115200);<br />
  while (!Serial) {<br />
    ; // Wait for serial port to connect<br />
  }<br />
<br />
  // Initialize the W5500 module<br />
  pinMode(W5500_RST_PIN, OUTPUT);<br />
  pinMode(W5500_INT_PIN, INPUT);<br />
  digitalWrite(W5500_RST_PIN, LOW);  // Reset the W5500 module<br />
  delay(100);                     &nbsp;&nbsp;// Wait for reset to complete<br />
  digitalWrite(W5500_RST_PIN, HIGH); // Release reset<br />
<br />
  // Initialize SPI with the correct pin definitions<br />
  SPI.begin(W5500_CLK_PIN, W5500_MISO_PIN, W5500_MOSI_PIN);<br />
<br />
  // Set up the Ethernet library with W5500-specific pins<br />
  Ethernet.init(W5500_CS_PIN);<br />
<br />
  // Start the Ethernet connection with static IP configuration<br />
  Ethernet.begin(mac, ip, dns, gateway, subnet);<br />
<br />
  // Print the IP address to the serial monitor<br />
  Serial.print("IP Address: ");<br />
  Serial.println(Ethernet.localIP());<br />
<br />
  // Start listening for incoming TCP connections<br />
  server.begin();<br />
}<br />
<br />
void loop() {<br />
  // Check for incoming client connections<br />
  EthernetClient client = server.available();<br />
  if (client) {<br />
    Serial.println("New client connected");<br />
<br />
    // Read data from the client and echo it back<br />
    while (client.connected()) {<br />
      if (client.available()) {<br />
        char c = client.read();<br />
        server.write(c);<br />
      }<br />
    }<br />
<br />
    // Close the connection when done<br />
    client.stop();<br />
    Serial.println("Client disconnected");<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8337" target="_blank" title="">8-Ethernet-W5500.zip</a> (Size: 1.23 KB / Downloads: 331)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8338" target="_blank" title="">8-Ethernet-W5500.ino.merged.zip</a> (Size: 188.93 KB / Downloads: 337)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * This Arduino program sets up an ESP32-S3 with a W5500 Ethernet module<br />
 * as a TCP server. It listens on port 4196 and echoes back any string <br />
 * received from a client.<br />
 *<br />
 * Hardware connections:<br />
 * - CLK: GPIO42<br />
 * - MOSI: GPIO43<br />
 * - MISO: GPIO44<br />
 * - CS: GPIO41<br />
 * - RST: GPIO1<br />
 * - INT: GPIO2<br />
 *<br />
 * Static IP address: 192.168.3.55<br />
 * Subnet Mask: 255.255.255.0<br />
 * Gateway: 192.168.3.1<br />
 * DNS: 192.168.3.1<br />
 */<br />
<br />
#include &lt;SPI.h&gt;<br />
#include &lt;Ethernet.h&gt;<br />
<br />
// Define the W5500 Ethernet module pins<br />
#define W5500_CS_PIN  41<br />
#define W5500_RST_PIN 1<br />
#define W5500_INT_PIN 2<br />
#define W5500_CLK_PIN 42<br />
#define W5500_MOSI_PIN 43<br />
#define W5500_MISO_PIN 44<br />
<br />
// MAC address for your Ethernet shield (must be unique on your network)<br />
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br />
<br />
// Static IP address configuration<br />
IPAddress ip(192, 168, 3, 55);     &nbsp;&nbsp;// Static IP address<br />
IPAddress subnet(255, 255, 255, 0); &nbsp;&nbsp;// Subnet mask<br />
IPAddress gateway(192, 168, 3, 1);    // Default gateway<br />
IPAddress dns(192, 168, 3, 1);        // DNS server address<br />
<br />
// Create an EthernetServer object to handle TCP connections<br />
EthernetServer server(4196);<br />
<br />
void setup() {<br />
  // Initialize serial communication<br />
  Serial.begin(115200);<br />
  while (!Serial) {<br />
    ; // Wait for serial port to connect<br />
  }<br />
<br />
  // Initialize the W5500 module<br />
  pinMode(W5500_RST_PIN, OUTPUT);<br />
  pinMode(W5500_INT_PIN, INPUT);<br />
  digitalWrite(W5500_RST_PIN, LOW);  // Reset the W5500 module<br />
  delay(100);                     &nbsp;&nbsp;// Wait for reset to complete<br />
  digitalWrite(W5500_RST_PIN, HIGH); // Release reset<br />
<br />
  // Initialize SPI with the correct pin definitions<br />
  SPI.begin(W5500_CLK_PIN, W5500_MISO_PIN, W5500_MOSI_PIN);<br />
<br />
  // Set up the Ethernet library with W5500-specific pins<br />
  Ethernet.init(W5500_CS_PIN);<br />
<br />
  // Start the Ethernet connection with static IP configuration<br />
  Ethernet.begin(mac, ip, dns, gateway, subnet);<br />
<br />
  // Print the IP address to the serial monitor<br />
  Serial.print("IP Address: ");<br />
  Serial.println(Ethernet.localIP());<br />
<br />
  // Start listening for incoming TCP connections<br />
  server.begin();<br />
}<br />
<br />
void loop() {<br />
  // Check for incoming client connections<br />
  EthernetClient client = server.available();<br />
  if (client) {<br />
    Serial.println("New client connected");<br />
<br />
    // Read data from the client and echo it back<br />
    while (client.connected()) {<br />
      if (client.available()) {<br />
        char c = client.read();<br />
        server.write(c);<br />
      }<br />
    }<br />
<br />
    // Close the connection when done<br />
    client.stop();<br />
    Serial.println("Client disconnected");<br />
  }<br />
}</code></div></div> arduino ino file download: <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=8337" target="_blank" title="">8-Ethernet-W5500.zip</a> (Size: 1.23 KB / Downloads: 331)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8338" target="_blank" title="">8-Ethernet-W5500.ino.merged.zip</a> (Size: 188.93 KB / Downloads: 337)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-07 how to DS3231 RTC clock]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8541</link>
			<pubDate>Mon, 15 Sep 2025 09:31:39 +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=8541</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * DS3231 RTC with Arduino<br />
 *<br />
 * This program demonstrates how to use the DS3231 RTC (Real-Time Clock) module with the Arduino.<br />
 * It includes functionality to:<br />
 * - Initialize the DS3231 RTC module<br />
 * - Read the current date and time from the RTC<br />
 * - Set the RTC time based on a serial command:Command format: DYYYY-MM-DDTHH:MM:SS<br />
 *<br />
 * Hardware Connections:<br />
 * - SDA: GPIO 8<br />
 * - SCL: GPIO 18<br />
 */<br />
<br />
#include &lt;DS3231.h&gt;<br />
#include &lt;Wire.h&gt;<br />
<br />
String serial_cmd_rcv = ""; // Serial port receiver<br />
<br />
typedef struct<br />
{<br />
  byte year;    // Last two digits of the year, library adds 2000.<br />
  byte month;<br />
  byte day;<br />
  byte hour;<br />
  byte minute;<br />
  byte second;<br />
} MY_DATE_STR;<br />
<br />
MY_DATE_STR my_date_str = {0};<br />
<br />
// Define constants for relay control<br />
#define OPEN_RLY_DATA    26<br />
#define OPEN_RLY_MONTH &nbsp;&nbsp;4<br />
#define CLOSE_RLY_DATA &nbsp;&nbsp;2<br />
#define CLOSE_RLY_MONTH  5<br />
<br />
// Define pin connections<br />
#define SDA_PIN &nbsp;&nbsp;8<br />
#define SCL_PIN &nbsp;&nbsp;18<br />
<br />
DS3231 rtc; // Create an instance of the DS3231 RTC<br />
bool h12Flag;<br />
bool pmFlag;<br />
static bool bCentury = false;<br />
static bool old_level_high = false;<br />
static bool old_level_low = false;<br />
<br />
<br />
/**<br />
 * @brief Print the current time from the RTC to the Serial Monitor.<br />
 */<br />
static void PrintfCurTime()<br />
{<br />
  Serial.print("Current time is: ");<br />
  int year = rtc.getYear() + 2000;<br />
  Serial.print(year);<br />
  Serial.print("-");<br />
<br />
  Serial.print(rtc.getMonth(bCentury), DEC);<br />
  Serial.print("-");<br />
<br />
  Serial.print(rtc.getDate(), DEC);<br />
  Serial.print(" ");<br />
<br />
  Serial.print(rtc.getHour(h12Flag, pmFlag), DEC);<br />
  Serial.print(":");<br />
  Serial.print(rtc.getMinute(), DEC);<br />
  Serial.print(":");<br />
  Serial.println(rtc.getSecond(), DEC);<br />
}<br />
<br />
/**<br />
 * @brief Process serial commands to set the RTC time.<br />
 * Command format: DYYYY-MM-DDTHH:MM:SS<br />
 */<br />
static void GetSerialCmd()<br />
{<br />
  if (Serial.available() &gt; 0)<br />
  {<br />
    delay(100);<br />
    int num_read = Serial.available();<br />
    while (num_read--)<br />
      serial_cmd_rcv += char(Serial.read());<br />
  }<br />
  else return;<br />
<br />
  serial_cmd_rcv.trim();<br />
<br />
  if (serial_cmd_rcv == "current time")<br />
  {<br />
    PrintfCurTime();<br />
    serial_cmd_rcv = "";<br />
    return;<br />
  }<br />
<br />
  Serial.print("Received length: ");<br />
  Serial.println(serial_cmd_rcv.length());<br />
<br />
  int indexof_d = serial_cmd_rcv.indexOf('D');<br />
  int indexof_t = serial_cmd_rcv.indexOf('T');<br />
<br />
  Serial.print("D index: ");<br />
  Serial.print(indexof_d);<br />
  Serial.print(" T index: ");<br />
  Serial.println(indexof_t);<br />
<br />
  if (serial_cmd_rcv.length() != 20 || <br />
      serial_cmd_rcv.substring(0, 1) != "D" ||<br />
      serial_cmd_rcv.substring(11, 12) != "T")  <br />
  {<br />
    Serial.println(serial_cmd_rcv);<br />
    serial_cmd_rcv = "";<br />
    return;<br />
  }<br />
<br />
  Serial.println("Setting time...");<br />
<br />
  my_date_str.year = (byte)serial_cmd_rcv.substring(3, 5).toInt();<br />
  my_date_str.month = (byte)serial_cmd_rcv.substring(6, 8).toInt();<br />
  my_date_str.day = (byte)serial_cmd_rcv.substring(9, 11).toInt();<br />
  my_date_str.hour = (byte)serial_cmd_rcv.substring(12, 14).toInt();<br />
  my_date_str.minute = (byte)serial_cmd_rcv.substring(15, 17).toInt();<br />
  my_date_str.second = (byte)serial_cmd_rcv.substring(18).toInt();<br />
<br />
  rtc.setYear(my_date_str.year);<br />
  rtc.setMonth(my_date_str.month);<br />
  rtc.setDate(my_date_str.day);<br />
  rtc.setHour(my_date_str.hour);<br />
  rtc.setMinute(my_date_str.minute);<br />
  rtc.setSecond(my_date_str.second);<br />
<br />
  serial_cmd_rcv = "";<br />
<br />
  Serial.println("Time set.");<br />
}<br />
<br />
void setup() {<br />
  // Initialize the I2C interface<br />
  Wire.begin(SDA_PIN, SCL_PIN, 40000);<br />
  <br />
  // Initialize Serial communication<br />
  Serial.begin(115200);<br />
 &nbsp;&nbsp;<br />
  // Set the RTC to 24-hour mode<br />
  rtc.setClockMode(false); // 24-hour format<br />
<br />
  // Print current time to Serial Monitor<br />
  PrintfCurTime();<br />
<br />
  // Clear any remaining serial data<br />
  while (Serial.read() &gt;= 0) {}<br />
}<br />
<br />
void loop() {<br />
  // Process incoming serial commands<br />
  GetSerialCmd(); <br />
  delay(1000); // Delay for 1 second<br />
}</code></div></div> arduino ino file download: <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=8335" target="_blank" title="">7-DS3231-RTC.zip</a> (Size: 1.51 KB / Downloads: 332)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8336" target="_blank" title="">7-DS3231-RTC.ino.merged.zip</a> (Size: 198.29 KB / Downloads: 326)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * DS3231 RTC with Arduino<br />
 *<br />
 * This program demonstrates how to use the DS3231 RTC (Real-Time Clock) module with the Arduino.<br />
 * It includes functionality to:<br />
 * - Initialize the DS3231 RTC module<br />
 * - Read the current date and time from the RTC<br />
 * - Set the RTC time based on a serial command:Command format: DYYYY-MM-DDTHH:MM:SS<br />
 *<br />
 * Hardware Connections:<br />
 * - SDA: GPIO 8<br />
 * - SCL: GPIO 18<br />
 */<br />
<br />
#include &lt;DS3231.h&gt;<br />
#include &lt;Wire.h&gt;<br />
<br />
String serial_cmd_rcv = ""; // Serial port receiver<br />
<br />
typedef struct<br />
{<br />
  byte year;    // Last two digits of the year, library adds 2000.<br />
  byte month;<br />
  byte day;<br />
  byte hour;<br />
  byte minute;<br />
  byte second;<br />
} MY_DATE_STR;<br />
<br />
MY_DATE_STR my_date_str = {0};<br />
<br />
// Define constants for relay control<br />
#define OPEN_RLY_DATA    26<br />
#define OPEN_RLY_MONTH &nbsp;&nbsp;4<br />
#define CLOSE_RLY_DATA &nbsp;&nbsp;2<br />
#define CLOSE_RLY_MONTH  5<br />
<br />
// Define pin connections<br />
#define SDA_PIN &nbsp;&nbsp;8<br />
#define SCL_PIN &nbsp;&nbsp;18<br />
<br />
DS3231 rtc; // Create an instance of the DS3231 RTC<br />
bool h12Flag;<br />
bool pmFlag;<br />
static bool bCentury = false;<br />
static bool old_level_high = false;<br />
static bool old_level_low = false;<br />
<br />
<br />
/**<br />
 * @brief Print the current time from the RTC to the Serial Monitor.<br />
 */<br />
static void PrintfCurTime()<br />
{<br />
  Serial.print("Current time is: ");<br />
  int year = rtc.getYear() + 2000;<br />
  Serial.print(year);<br />
  Serial.print("-");<br />
<br />
  Serial.print(rtc.getMonth(bCentury), DEC);<br />
  Serial.print("-");<br />
<br />
  Serial.print(rtc.getDate(), DEC);<br />
  Serial.print(" ");<br />
<br />
  Serial.print(rtc.getHour(h12Flag, pmFlag), DEC);<br />
  Serial.print(":");<br />
  Serial.print(rtc.getMinute(), DEC);<br />
  Serial.print(":");<br />
  Serial.println(rtc.getSecond(), DEC);<br />
}<br />
<br />
/**<br />
 * @brief Process serial commands to set the RTC time.<br />
 * Command format: DYYYY-MM-DDTHH:MM:SS<br />
 */<br />
static void GetSerialCmd()<br />
{<br />
  if (Serial.available() &gt; 0)<br />
  {<br />
    delay(100);<br />
    int num_read = Serial.available();<br />
    while (num_read--)<br />
      serial_cmd_rcv += char(Serial.read());<br />
  }<br />
  else return;<br />
<br />
  serial_cmd_rcv.trim();<br />
<br />
  if (serial_cmd_rcv == "current time")<br />
  {<br />
    PrintfCurTime();<br />
    serial_cmd_rcv = "";<br />
    return;<br />
  }<br />
<br />
  Serial.print("Received length: ");<br />
  Serial.println(serial_cmd_rcv.length());<br />
<br />
  int indexof_d = serial_cmd_rcv.indexOf('D');<br />
  int indexof_t = serial_cmd_rcv.indexOf('T');<br />
<br />
  Serial.print("D index: ");<br />
  Serial.print(indexof_d);<br />
  Serial.print(" T index: ");<br />
  Serial.println(indexof_t);<br />
<br />
  if (serial_cmd_rcv.length() != 20 || <br />
      serial_cmd_rcv.substring(0, 1) != "D" ||<br />
      serial_cmd_rcv.substring(11, 12) != "T")  <br />
  {<br />
    Serial.println(serial_cmd_rcv);<br />
    serial_cmd_rcv = "";<br />
    return;<br />
  }<br />
<br />
  Serial.println("Setting time...");<br />
<br />
  my_date_str.year = (byte)serial_cmd_rcv.substring(3, 5).toInt();<br />
  my_date_str.month = (byte)serial_cmd_rcv.substring(6, 8).toInt();<br />
  my_date_str.day = (byte)serial_cmd_rcv.substring(9, 11).toInt();<br />
  my_date_str.hour = (byte)serial_cmd_rcv.substring(12, 14).toInt();<br />
  my_date_str.minute = (byte)serial_cmd_rcv.substring(15, 17).toInt();<br />
  my_date_str.second = (byte)serial_cmd_rcv.substring(18).toInt();<br />
<br />
  rtc.setYear(my_date_str.year);<br />
  rtc.setMonth(my_date_str.month);<br />
  rtc.setDate(my_date_str.day);<br />
  rtc.setHour(my_date_str.hour);<br />
  rtc.setMinute(my_date_str.minute);<br />
  rtc.setSecond(my_date_str.second);<br />
<br />
  serial_cmd_rcv = "";<br />
<br />
  Serial.println("Time set.");<br />
}<br />
<br />
void setup() {<br />
  // Initialize the I2C interface<br />
  Wire.begin(SDA_PIN, SCL_PIN, 40000);<br />
  <br />
  // Initialize Serial communication<br />
  Serial.begin(115200);<br />
 &nbsp;&nbsp;<br />
  // Set the RTC to 24-hour mode<br />
  rtc.setClockMode(false); // 24-hour format<br />
<br />
  // Print current time to Serial Monitor<br />
  PrintfCurTime();<br />
<br />
  // Clear any remaining serial data<br />
  while (Serial.read() &gt;= 0) {}<br />
}<br />
<br />
void loop() {<br />
  // Process incoming serial commands<br />
  GetSerialCmd(); <br />
  delay(1000); // Delay for 1 second<br />
}</code></div></div> arduino ino file download: <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=8335" target="_blank" title="">7-DS3231-RTC.zip</a> (Size: 1.51 KB / Downloads: 332)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8336" target="_blank" title="">7-DS3231-RTC.ino.merged.zip</a> (Size: 198.29 KB / Downloads: 326)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-06 How to use SD Card]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8540</link>
			<pubDate>Mon, 15 Sep 2025 09:30:37 +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=8540</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * SD Card File Operations<br />
 *<br />
 * This program demonstrates basic file operations on an SD card using the ESP32.<br />
 * It includes functionality to:<br />
 * - Initialize and test the SD card<br />
 * - Read from, write to, append to, and delete files on the SD card<br />
 * - Measure file read and write performance<br />
 *<br />
 * Hardware Connections:<br />
 * - SCK: GPIO 11<br />
 * - MISO: GPIO 12<br />
 * - MOSI: GPIO 10<br />
 * - CS: GPIO 9<br />
 */<br />
<br />
#include "FS.h"<br />
#include "SD.h"<br />
#include "SPI.h"<br />
<br />
// Pin definitions for SD card<br />
#define SCK  11<br />
#define MISO 12<br />
#define MOSI 10<br />
#define CS &nbsp;&nbsp;9<br />
<br />
/**<br />
 * @brief Reads the contents of a file from the SD card and prints it to the serial monitor.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to read.<br />
 */<br />
void readFile(fs::FS &amp;fs, const char * path) {<br />
  Serial.printf("Reading file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for reading");<br />
    return;<br />
  }<br />
<br />
  Serial.print("Read from file: ");<br />
  while (file.available()) {<br />
    Serial.print((char)file.read());<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Writes a message to a file on the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to write.<br />
 * @param message Message to write to the file.<br />
 */<br />
void writeFile(fs::FS &amp;fs, const char * path, const char * message) {<br />
  Serial.printf("Writing file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path, FILE_WRITE);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for writing");<br />
    return;<br />
  }<br />
  if (file.print(message)) {<br />
    Serial.println("File written");<br />
  } else {<br />
    Serial.println("Write failed");<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Appends a message to a file on the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to append.<br />
 * @param message Message to append to the file.<br />
 */<br />
void appendFile(fs::FS &amp;fs, const char * path, const char * message) {<br />
  Serial.printf("Appending to file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path, FILE_APPEND);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for appending");<br />
    return;<br />
  }<br />
  if (file.print(message)) {<br />
    Serial.println("Message appended");<br />
  } else {<br />
    Serial.println("Append failed");<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Deletes a file from the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to delete.<br />
 */<br />
void deleteFile(fs::FS &amp;fs, const char * path) {<br />
  Serial.printf("Deleting file: %s&#92;n", path);<br />
  if (fs.remove(path)) {<br />
    Serial.println("File deleted");<br />
  } else {<br />
    Serial.println("Delete failed");<br />
  }<br />
}<br />
<br />
/**<br />
 * @brief Tests file read and write performance.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to test.<br />
 */<br />
void testFileIO(fs::FS &amp;fs, const char * path) {<br />
  File file = fs.open(path);<br />
  static uint8_t buf[512];<br />
  size_t len = 0;<br />
  uint32_t start = millis();<br />
  uint32_t end = start;<br />
<br />
  if (file) {<br />
    len = file.size();<br />
    size_t flen = len;<br />
    start = millis();<br />
    while (len) {<br />
      size_t toRead = len;<br />
      if (toRead &gt; 512) {<br />
        toRead = 512;<br />
      }<br />
      file.read(buf, toRead);<br />
      len -= toRead;<br />
    }<br />
    end = millis() - start;<br />
    Serial.printf("%u bytes read for %u ms&#92;n", flen, end);<br />
    file.close();<br />
  } else {<br />
    Serial.println("Failed to open file for reading");<br />
  }<br />
<br />
  file = fs.open(path, FILE_WRITE);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for writing");<br />
    return;<br />
  }<br />
<br />
  size_t i;<br />
  start = millis();<br />
  for (i = 0; i &lt; 2048; i++) {<br />
    file.write(buf, 512);<br />
  }<br />
  end = millis() - start;<br />
  Serial.printf("%u bytes written for %u ms&#92;n", 2048 * 512, end);<br />
  file.close();<br />
}<br />
<br />
void setup() {<br />
  // Initialize serial communication<br />
  Serial.begin(115200);<br />
  <br />
  // Initialize SPI and SD card<br />
  SPIClass spi = SPIClass(HSPI);<br />
  spi.begin(SCK, MISO, MOSI, CS);<br />
<br />
  if (!SD.begin(CS, spi, 80000000)) {<br />
    Serial.println("Card Mount Failed");<br />
    return;<br />
  }<br />
<br />
  uint8_t cardType = SD.cardType();<br />
<br />
  if (cardType == CARD_NONE) {<br />
    Serial.println("No SD card attached");<br />
    return;<br />
  }<br />
<br />
  Serial.print("SD Card Type: ");<br />
  if (cardType == CARD_MMC) {<br />
    Serial.println("MMC");<br />
  } else if (cardType == CARD_SD) {<br />
    Serial.println("SDSC");<br />
  } else if (cardType == CARD_SDHC) {<br />
    Serial.println("SDHC");<br />
  } else {<br />
    Serial.println("UNKNOWN");<br />
  }<br />
<br />
  uint64_t cardSize = SD.cardSize() / (1024 * 1024);<br />
  Serial.printf("SD Card Size: %lluMB&#92;n", cardSize);<br />
  delay(2000);<br />
<br />
  // Perform file operations<br />
  deleteFile(SD, "/hello.txt");<br />
  writeFile(SD, "/hello.txt", "Hello ");<br />
  appendFile(SD, "/hello.txt", "World!&#92;n");<br />
  readFile(SD, "/hello.txt");<br />
  testFileIO(SD, "/test.txt");<br />
  Serial.printf("Total space: %lluMB&#92;n", SD.totalBytes() / (1024 * 1024));<br />
  Serial.printf("Used space: %lluMB&#92;n", SD.usedBytes() / (1024 * 1024));<br />
}<br />
<br />
void loop() {<br />
  // No operation in loop<br />
}</code></div></div> arduino ino file download: <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=8333" target="_blank" title="">6-SD.zip</a> (Size: 1.53 KB / Downloads: 308)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8334" target="_blank" title="">6-SD.ino.merged.zip</a> (Size: 221.05 KB / Downloads: 352)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * SD Card File Operations<br />
 *<br />
 * This program demonstrates basic file operations on an SD card using the ESP32.<br />
 * It includes functionality to:<br />
 * - Initialize and test the SD card<br />
 * - Read from, write to, append to, and delete files on the SD card<br />
 * - Measure file read and write performance<br />
 *<br />
 * Hardware Connections:<br />
 * - SCK: GPIO 11<br />
 * - MISO: GPIO 12<br />
 * - MOSI: GPIO 10<br />
 * - CS: GPIO 9<br />
 */<br />
<br />
#include "FS.h"<br />
#include "SD.h"<br />
#include "SPI.h"<br />
<br />
// Pin definitions for SD card<br />
#define SCK  11<br />
#define MISO 12<br />
#define MOSI 10<br />
#define CS &nbsp;&nbsp;9<br />
<br />
/**<br />
 * @brief Reads the contents of a file from the SD card and prints it to the serial monitor.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to read.<br />
 */<br />
void readFile(fs::FS &amp;fs, const char * path) {<br />
  Serial.printf("Reading file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for reading");<br />
    return;<br />
  }<br />
<br />
  Serial.print("Read from file: ");<br />
  while (file.available()) {<br />
    Serial.print((char)file.read());<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Writes a message to a file on the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to write.<br />
 * @param message Message to write to the file.<br />
 */<br />
void writeFile(fs::FS &amp;fs, const char * path, const char * message) {<br />
  Serial.printf("Writing file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path, FILE_WRITE);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for writing");<br />
    return;<br />
  }<br />
  if (file.print(message)) {<br />
    Serial.println("File written");<br />
  } else {<br />
    Serial.println("Write failed");<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Appends a message to a file on the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to append.<br />
 * @param message Message to append to the file.<br />
 */<br />
void appendFile(fs::FS &amp;fs, const char * path, const char * message) {<br />
  Serial.printf("Appending to file: %s&#92;n", path);<br />
<br />
  File file = fs.open(path, FILE_APPEND);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for appending");<br />
    return;<br />
  }<br />
  if (file.print(message)) {<br />
    Serial.println("Message appended");<br />
  } else {<br />
    Serial.println("Append failed");<br />
  }<br />
  file.close();<br />
}<br />
<br />
/**<br />
 * @brief Deletes a file from the SD card.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to delete.<br />
 */<br />
void deleteFile(fs::FS &amp;fs, const char * path) {<br />
  Serial.printf("Deleting file: %s&#92;n", path);<br />
  if (fs.remove(path)) {<br />
    Serial.println("File deleted");<br />
  } else {<br />
    Serial.println("Delete failed");<br />
  }<br />
}<br />
<br />
/**<br />
 * @brief Tests file read and write performance.<br />
 * <br />
 * @param fs File system to use (in this case, SD).<br />
 * @param path Path of the file to test.<br />
 */<br />
void testFileIO(fs::FS &amp;fs, const char * path) {<br />
  File file = fs.open(path);<br />
  static uint8_t buf[512];<br />
  size_t len = 0;<br />
  uint32_t start = millis();<br />
  uint32_t end = start;<br />
<br />
  if (file) {<br />
    len = file.size();<br />
    size_t flen = len;<br />
    start = millis();<br />
    while (len) {<br />
      size_t toRead = len;<br />
      if (toRead &gt; 512) {<br />
        toRead = 512;<br />
      }<br />
      file.read(buf, toRead);<br />
      len -= toRead;<br />
    }<br />
    end = millis() - start;<br />
    Serial.printf("%u bytes read for %u ms&#92;n", flen, end);<br />
    file.close();<br />
  } else {<br />
    Serial.println("Failed to open file for reading");<br />
  }<br />
<br />
  file = fs.open(path, FILE_WRITE);<br />
  if (!file) {<br />
    Serial.println("Failed to open file for writing");<br />
    return;<br />
  }<br />
<br />
  size_t i;<br />
  start = millis();<br />
  for (i = 0; i &lt; 2048; i++) {<br />
    file.write(buf, 512);<br />
  }<br />
  end = millis() - start;<br />
  Serial.printf("%u bytes written for %u ms&#92;n", 2048 * 512, end);<br />
  file.close();<br />
}<br />
<br />
void setup() {<br />
  // Initialize serial communication<br />
  Serial.begin(115200);<br />
  <br />
  // Initialize SPI and SD card<br />
  SPIClass spi = SPIClass(HSPI);<br />
  spi.begin(SCK, MISO, MOSI, CS);<br />
<br />
  if (!SD.begin(CS, spi, 80000000)) {<br />
    Serial.println("Card Mount Failed");<br />
    return;<br />
  }<br />
<br />
  uint8_t cardType = SD.cardType();<br />
<br />
  if (cardType == CARD_NONE) {<br />
    Serial.println("No SD card attached");<br />
    return;<br />
  }<br />
<br />
  Serial.print("SD Card Type: ");<br />
  if (cardType == CARD_MMC) {<br />
    Serial.println("MMC");<br />
  } else if (cardType == CARD_SD) {<br />
    Serial.println("SDSC");<br />
  } else if (cardType == CARD_SDHC) {<br />
    Serial.println("SDHC");<br />
  } else {<br />
    Serial.println("UNKNOWN");<br />
  }<br />
<br />
  uint64_t cardSize = SD.cardSize() / (1024 * 1024);<br />
  Serial.printf("SD Card Size: %lluMB&#92;n", cardSize);<br />
  delay(2000);<br />
<br />
  // Perform file operations<br />
  deleteFile(SD, "/hello.txt");<br />
  writeFile(SD, "/hello.txt", "Hello ");<br />
  appendFile(SD, "/hello.txt", "World!&#92;n");<br />
  readFile(SD, "/hello.txt");<br />
  testFileIO(SD, "/test.txt");<br />
  Serial.printf("Total space: %lluMB&#92;n", SD.totalBytes() / (1024 * 1024));<br />
  Serial.printf("Used space: %lluMB&#92;n", SD.usedBytes() / (1024 * 1024));<br />
}<br />
<br />
void loop() {<br />
  // No operation in loop<br />
}</code></div></div> arduino ino file download: <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=8333" target="_blank" title="">6-SD.zip</a> (Size: 1.53 KB / Downloads: 308)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8334" target="_blank" title="">6-SD.ino.merged.zip</a> (Size: 221.05 KB / Downloads: 352)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-05 IR send]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8539</link>
			<pubDate>Mon, 15 Sep 2025 09:29:39 +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=8539</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Copyright (c) 2025 KinCony IoT<br />
 * https://www.kincony.com<br />
 *<br />
 * Description:<br />
 * This program generates a 38 kHz PWM signal on a specified GPIO pin<br />
 * using the ESP32-S3 LEDC hardware peripheral.<br />
 * The output can be used to drive an IR LED for infrared signal transmission.<br />
 */<br />
<br />
#include &lt;Arduino.h&gt;<br />
#include "driver/ledc.h"<br />
<br />
#define IR_SEND_PIN 14  // GPIO pin connected to the IR LED<br />
<br />
void setup() {<br />
  Serial.begin(115200);<br />
<br />
  // Configure the LEDC timer<br />
  ledc_timer_config_t ledc_timer = {<br />
      .speed_mode = LEDC_LOW_SPEED_MODE,     &nbsp;&nbsp;// Use low-speed mode<br />
      .duty_resolution = LEDC_TIMER_8_BIT,   &nbsp;&nbsp;// 8-bit resolution (0-255)<br />
      .timer_num = LEDC_TIMER_0,             &nbsp;&nbsp;// Select timer 0<br />
      .freq_hz = 38000,                        // Set frequency to 38 kHz<br />
      .clk_cfg = LEDC_AUTO_CLK               &nbsp;&nbsp;// Automatically select the clock source<br />
  };<br />
  ledc_timer_config(&amp;ledc_timer);<br />
<br />
  // Configure the LEDC channel<br />
  ledc_channel_config_t ledc_channel = {<br />
      .gpio_num = IR_SEND_PIN,               &nbsp;&nbsp;// Output GPIO pin<br />
      .speed_mode = LEDC_LOW_SPEED_MODE,     &nbsp;&nbsp;// Use low-speed mode<br />
      .channel = LEDC_CHANNEL_0,             &nbsp;&nbsp;// Channel 0<br />
      .intr_type = LEDC_INTR_DISABLE,          // Disable interrupts<br />
      .timer_sel = LEDC_TIMER_0,                // Use timer 0<br />
      .duty = 128,                           &nbsp;&nbsp;// 50% duty cycle (128/255)<br />
      .hpoint = 0                              // Start at high point 0<br />
  };<br />
  ledc_channel_config(&amp;ledc_channel);<br />
<br />
  Serial.println("38kHz PWM started.");<br />
}<br />
<br />
void loop() {<br />
  // Continuously output the carrier wave<br />
}</code></div></div> arduino ino file download: <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=8331" target="_blank" title="">5-IR-send-ESP32.zip</a> (Size: 904 bytes / Downloads: 334)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8332" target="_blank" title="">5-IR-send-ESP32.ino.merged.zip</a> (Size: 187.02 KB / Downloads: 285)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Copyright (c) 2025 KinCony IoT<br />
 * https://www.kincony.com<br />
 *<br />
 * Description:<br />
 * This program generates a 38 kHz PWM signal on a specified GPIO pin<br />
 * using the ESP32-S3 LEDC hardware peripheral.<br />
 * The output can be used to drive an IR LED for infrared signal transmission.<br />
 */<br />
<br />
#include &lt;Arduino.h&gt;<br />
#include "driver/ledc.h"<br />
<br />
#define IR_SEND_PIN 14  // GPIO pin connected to the IR LED<br />
<br />
void setup() {<br />
  Serial.begin(115200);<br />
<br />
  // Configure the LEDC timer<br />
  ledc_timer_config_t ledc_timer = {<br />
      .speed_mode = LEDC_LOW_SPEED_MODE,     &nbsp;&nbsp;// Use low-speed mode<br />
      .duty_resolution = LEDC_TIMER_8_BIT,   &nbsp;&nbsp;// 8-bit resolution (0-255)<br />
      .timer_num = LEDC_TIMER_0,             &nbsp;&nbsp;// Select timer 0<br />
      .freq_hz = 38000,                        // Set frequency to 38 kHz<br />
      .clk_cfg = LEDC_AUTO_CLK               &nbsp;&nbsp;// Automatically select the clock source<br />
  };<br />
  ledc_timer_config(&amp;ledc_timer);<br />
<br />
  // Configure the LEDC channel<br />
  ledc_channel_config_t ledc_channel = {<br />
      .gpio_num = IR_SEND_PIN,               &nbsp;&nbsp;// Output GPIO pin<br />
      .speed_mode = LEDC_LOW_SPEED_MODE,     &nbsp;&nbsp;// Use low-speed mode<br />
      .channel = LEDC_CHANNEL_0,             &nbsp;&nbsp;// Channel 0<br />
      .intr_type = LEDC_INTR_DISABLE,          // Disable interrupts<br />
      .timer_sel = LEDC_TIMER_0,                // Use timer 0<br />
      .duty = 128,                           &nbsp;&nbsp;// 50% duty cycle (128/255)<br />
      .hpoint = 0                              // Start at high point 0<br />
  };<br />
  ledc_channel_config(&amp;ledc_channel);<br />
<br />
  Serial.println("38kHz PWM started.");<br />
}<br />
<br />
void loop() {<br />
  // Continuously output the carrier wave<br />
}</code></div></div> arduino ino file download: <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=8331" target="_blank" title="">5-IR-send-ESP32.zip</a> (Size: 904 bytes / Downloads: 334)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8332" target="_blank" title="">5-IR-send-ESP32.ino.merged.zip</a> (Size: 187.02 KB / Downloads: 285)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-04 RS485 communication test]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8538</link>
			<pubDate>Mon, 15 Sep 2025 09:28:29 +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=8538</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * RS485 Communication Test<br />
 *<br />
 * This program is a simple test for RS485 communication using ESP32-S3.<br />
 * It will send a message over RS485 and then read incoming messages.<br />
 * The TXD pin is defined as GPIO 16 and RXD pin is defined as GPIO 17.<br />
 */<br />
<br />
#include &lt;HardwareSerial.h&gt;<br />
<br />
// Define RS485 pins<br />
#define RS485_RXD 47<br />
#define RS485_TXD 3<br />
<br />
// Create a hardware serial object<br />
HardwareSerial rs485Serial(1);<br />
<br />
void setup() {<br />
  // Start serial communication for debugging<br />
  Serial.begin(115200);<br />
  while (!Serial);<br />
<br />
  // Initialize RS485 Serial communication<br />
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);<br />
  <br />
  Serial.println("RS485 Test Start");<br />
}<br />
<br />
void loop() {<br />
  // Send a test message<br />
  rs485Serial.println("Hello from KinCony Controller!");<br />
<br />
  // Wait for a short period<br />
  delay(1000);<br />
<br />
  // Check if data is available to read<br />
  if (rs485Serial.available()) {<br />
    String receivedMessage = "";<br />
    while (rs485Serial.available()) {<br />
      char c = rs485Serial.read();<br />
      receivedMessage += c;<br />
    }<br />
    // Print the received message<br />
    Serial.print("Received: ");<br />
    Serial.println(receivedMessage);<br />
  }<br />
<br />
  // Wait before sending the next message<br />
  delay(2000);<br />
}</code></div></div> arduino ino file download: <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=8329" target="_blank" title="">4-RS485-Test.zip</a> (Size: 766 bytes / Downloads: 278)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8330" target="_blank" title="">4-RS485-Test.ino.merged.zip</a> (Size: 189.46 KB / Downloads: 302)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * RS485 Communication Test<br />
 *<br />
 * This program is a simple test for RS485 communication using ESP32-S3.<br />
 * It will send a message over RS485 and then read incoming messages.<br />
 * The TXD pin is defined as GPIO 16 and RXD pin is defined as GPIO 17.<br />
 */<br />
<br />
#include &lt;HardwareSerial.h&gt;<br />
<br />
// Define RS485 pins<br />
#define RS485_RXD 47<br />
#define RS485_TXD 3<br />
<br />
// Create a hardware serial object<br />
HardwareSerial rs485Serial(1);<br />
<br />
void setup() {<br />
  // Start serial communication for debugging<br />
  Serial.begin(115200);<br />
  while (!Serial);<br />
<br />
  // Initialize RS485 Serial communication<br />
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);<br />
  <br />
  Serial.println("RS485 Test Start");<br />
}<br />
<br />
void loop() {<br />
  // Send a test message<br />
  rs485Serial.println("Hello from KinCony Controller!");<br />
<br />
  // Wait for a short period<br />
  delay(1000);<br />
<br />
  // Check if data is available to read<br />
  if (rs485Serial.available()) {<br />
    String receivedMessage = "";<br />
    while (rs485Serial.available()) {<br />
      char c = rs485Serial.read();<br />
      receivedMessage += c;<br />
    }<br />
    // Print the received message<br />
    Serial.print("Received: ");<br />
    Serial.println(receivedMessage);<br />
  }<br />
<br />
  // Wait before sending the next message<br />
  delay(2000);<br />
}</code></div></div> arduino ino file download: <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=8329" target="_blank" title="">4-RS485-Test.zip</a> (Size: 766 bytes / Downloads: 278)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8330" target="_blank" title="">4-RS485-Test.ino.merged.zip</a> (Size: 189.46 KB / Downloads: 302)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for AIO Hybrid]-03 Read analog input ports value]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8537</link>
			<pubDate>Mon, 15 Sep 2025 09:27:28 +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=8537</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * Description:<br />
 * This Arduino program reads analog values from four analog input pins (A1, A2, A3, A4)<br />
 * and prints the values to the Serial Monitor. The analog inputs are defined with specific<br />
 * GPIO pins and the program reads the voltage levels from these pins every 2 seconds.<br />
 *<br />
 * Pin Definitions:<br />
 * - A1: GPIO 5<br />
 * - A2: GPIO 7<br />
 * - A3: GPIO 6<br />
 * - A4: GPIO 4<br />
 */<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;5 &nbsp;&nbsp;// Define GPIO pin for analog input A1<br />
#define ANALOG_A2 &nbsp;&nbsp;7 &nbsp;&nbsp;// Define GPIO pin for analog input A2<br />
#define ANALOG_A3 &nbsp;&nbsp;6 &nbsp;&nbsp;// Define GPIO pin for analog input A3<br />
#define ANALOG_A4 &nbsp;&nbsp;4 &nbsp;&nbsp;// Define GPIO pin for analog input A4<br />
<br />
void setup()<br />
{<br />
    Serial.begin(115200); // Initialize serial communication at 115200 baud rate<br />
    delay(500); // Short delay to allow serial communication to start<br />
<br />
    pinMode(ANALOG_A1, INPUT); // Set GPIO 5 as an input for analog signal A1<br />
    pinMode(ANALOG_A2, INPUT); // Set GPIO 7 as an input for analog signal A2<br />
    pinMode(ANALOG_A3, INPUT); // Set GPIO 6 as an input for analog signal A3<br />
    pinMode(ANALOG_A4, INPUT); // Set GPIO 4 as an input for analog signal A4<br />
}<br />
<br />
void loop()<br />
{<br />
    // Read and print analog values from the defined pins<br />
    Serial.print("A1="); <br />
    Serial.println(analogRead(ANALOG_A1)); // Read and print the value from A1<br />
    Serial.print("A2=");<br />
    Serial.println(analogRead(ANALOG_A2)); // Read and print the value from A2<br />
    Serial.print("A3=");<br />
    Serial.println(analogRead(ANALOG_A3)); // Read and print the value from A3<br />
    Serial.print("A4=");<br />
    Serial.println(analogRead(ANALOG_A4)); // Read and print the value from A4<br />
    <br />
    delay(2000); // Wait for 2 seconds before the next reading<br />
}</code></div></div> arduino ino file download: <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=8327" target="_blank" title="">3-analog-input.zip</a> (Size: 769 bytes / Downloads: 297)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8328" target="_blank" title="">3-analog-input.ino.merged.zip</a> (Size: 189.25 KB / Downloads: 319)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/*<br />
 * Made by KinCony IoT: https://www.kincony.com<br />
 *<br />
 * Description:<br />
 * This Arduino program reads analog values from four analog input pins (A1, A2, A3, A4)<br />
 * and prints the values to the Serial Monitor. The analog inputs are defined with specific<br />
 * GPIO pins and the program reads the voltage levels from these pins every 2 seconds.<br />
 *<br />
 * Pin Definitions:<br />
 * - A1: GPIO 5<br />
 * - A2: GPIO 7<br />
 * - A3: GPIO 6<br />
 * - A4: GPIO 4<br />
 */<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;5 &nbsp;&nbsp;// Define GPIO pin for analog input A1<br />
#define ANALOG_A2 &nbsp;&nbsp;7 &nbsp;&nbsp;// Define GPIO pin for analog input A2<br />
#define ANALOG_A3 &nbsp;&nbsp;6 &nbsp;&nbsp;// Define GPIO pin for analog input A3<br />
#define ANALOG_A4 &nbsp;&nbsp;4 &nbsp;&nbsp;// Define GPIO pin for analog input A4<br />
<br />
void setup()<br />
{<br />
    Serial.begin(115200); // Initialize serial communication at 115200 baud rate<br />
    delay(500); // Short delay to allow serial communication to start<br />
<br />
    pinMode(ANALOG_A1, INPUT); // Set GPIO 5 as an input for analog signal A1<br />
    pinMode(ANALOG_A2, INPUT); // Set GPIO 7 as an input for analog signal A2<br />
    pinMode(ANALOG_A3, INPUT); // Set GPIO 6 as an input for analog signal A3<br />
    pinMode(ANALOG_A4, INPUT); // Set GPIO 4 as an input for analog signal A4<br />
}<br />
<br />
void loop()<br />
{<br />
    // Read and print analog values from the defined pins<br />
    Serial.print("A1="); <br />
    Serial.println(analogRead(ANALOG_A1)); // Read and print the value from A1<br />
    Serial.print("A2=");<br />
    Serial.println(analogRead(ANALOG_A2)); // Read and print the value from A2<br />
    Serial.print("A3=");<br />
    Serial.println(analogRead(ANALOG_A3)); // Read and print the value from A3<br />
    Serial.print("A4=");<br />
    Serial.println(analogRead(ANALOG_A4)); // Read and print the value from A4<br />
    <br />
    delay(2000); // Wait for 2 seconds before the next reading<br />
}</code></div></div> arduino ino file download: <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=8327" target="_blank" title="">3-analog-input.zip</a> (Size: 769 bytes / Downloads: 297)
<!-- end: postbit_attachments_attachment --><br />
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: <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=8328" target="_blank" title="">3-analog-input.ino.merged.zip</a> (Size: 189.25 KB / Downloads: 319)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
	</channel>
</rss>