<?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 - T32M]]></title>
		<link>https://www.kincony.com/forum/</link>
		<description><![CDATA[Smart Home Automation Forum - https://www.kincony.com/forum]]></description>
		<pubDate>Sun, 24 May 2026 20:11:09 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[T32M Smart Controller Wiring Examples]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=9275</link>
			<pubDate>Mon, 20 Apr 2026 13:32:09 +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=9275</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=9657" target="_blank" title="">T32M_wiring.jpg</a> (Size: 250.11 KB / Downloads: 71)
<!-- 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=9657" target="_blank" title="">T32M_wiring.jpg</a> (Size: 250.11 KB / Downloads: 71)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[T32M Smart Controller ESP32 system block diagram]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=9274</link>
			<pubDate>Mon, 20 Apr 2026 13:31:12 +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=9274</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=9656" target="_blank" title="">KinCony-T32M-smart-controller-diagram.png</a> (Size: 733.98 KB / Downloads: 60)
<!-- 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=9656" target="_blank" title="">KinCony-T32M-smart-controller-diagram.png</a> (Size: 733.98 KB / Downloads: 60)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-07 read analog input ports]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8246</link>
			<pubDate>Mon, 23 Jun 2025 13:28:47 +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=8246</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 7<br />
 * - A2: GPIO 6<br />
 * - A3: GPIO 5<br />
 * - A4: GPIO 4<br />
 */<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;7 &nbsp;&nbsp;// Define GPIO pin for analog input A1<br />
#define ANALOG_A2 &nbsp;&nbsp;6 &nbsp;&nbsp;// Define GPIO pin for analog input A2<br />
#define ANALOG_A3 &nbsp;&nbsp;5 &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=7843" target="_blank" title="">7-analog-input.zip</a> (Size: 768 bytes / Downloads: 408)
<!-- 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=7844" target="_blank" title="">7-analog-input.ino.merged.zip</a> (Size: 187.2 KB / Downloads: 403)
<!-- 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 7<br />
 * - A2: GPIO 6<br />
 * - A3: GPIO 5<br />
 * - A4: GPIO 4<br />
 */<br />
<br />
#define ANALOG_A1 &nbsp;&nbsp;7 &nbsp;&nbsp;// Define GPIO pin for analog input A1<br />
#define ANALOG_A2 &nbsp;&nbsp;6 &nbsp;&nbsp;// Define GPIO pin for analog input A2<br />
#define ANALOG_A3 &nbsp;&nbsp;5 &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=7843" target="_blank" title="">7-analog-input.zip</a> (Size: 768 bytes / Downloads: 408)
<!-- 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=7844" target="_blank" title="">7-analog-input.ino.merged.zip</a> (Size: 187.2 KB / Downloads: 403)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-06 digital INPUT trigger OUTPUT directly]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8245</link>
			<pubDate>Mon, 23 Jun 2025 13:27:35 +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=8245</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 program reads 32 input states from two PCF8575 I/O expanders<br />
 * and controls 32 relays via another two PCF8575 I/O expanders.<br />
 * When an input pin is LOW, the corresponding relay is turned ON (active LOW).<br />
 * When the input pin is HIGH, the corresponding relay is turned OFF.<br />
 *<br />
 * I2C Bus-1 Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * I2C Addresses:<br />
 * - Output1-16:  0x20<br />
 * - Output17-32: 0x21<br />
 * - Input1-16: &nbsp;&nbsp;0x24<br />
 * - Input17-32:  0x25<br />
 */<br />
<br />
#include &lt;Wire.h&gt;<br />
#include &lt;PCF8575.h&gt;<br />
<br />
// Define I2C pins<br />
#define I2C_SDA 48<br />
#define I2C_SCL 47<br />
<br />
// PCF8575 I2C addresses<br />
#define OUTPUT1_ADDR 0x20<br />
#define OUTPUT2_ADDR 0x21<br />
#define INPUT1_ADDR  0x24<br />
#define INPUT2_ADDR  0x25<br />
<br />
// Create PCF8575 objects<br />
PCF8575 pcf8575_IN1(INPUT1_ADDR); &nbsp;&nbsp;// Inputs 1~16<br />
PCF8575 pcf8575_IN2(INPUT2_ADDR); &nbsp;&nbsp;// Inputs 17~32<br />
PCF8575 pcf8575_OUT1(OUTPUT1_ADDR); // Outputs 1~16<br />
PCF8575 pcf8575_OUT2(OUTPUT2_ADDR); // Outputs 17~32<br />
<br />
void setup() {<br />
  // Initialize I2C with defined SDA and SCL<br />
  Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
  // Start serial communication<br />
  Serial.begin(115200);<br />
<br />
  // Initialize all PCF8575 devices<br />
  pcf8575_IN1.begin();<br />
  pcf8575_IN2.begin();<br />
  pcf8575_OUT1.begin();<br />
  pcf8575_OUT2.begin();<br />
<br />
  // Turn off all relays at start (LOW = OFF)<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    pcf8575_OUT1.write(i, HIGH);  // HIGH means OFF for relay<br />
    pcf8575_OUT2.write(i, HIGH);<br />
  }<br />
<br />
  Serial.println("System started: 32 inputs controlling 32 relays");<br />
}<br />
<br />
void loop() {<br />
  uint32_t inputState = 0;<br />
<br />
  // Read inputs 1~16<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (pcf8575_IN1.read(i)) {<br />
      inputState |= (1UL &lt;&lt; i);<br />
    }<br />
  }<br />
<br />
  // Read inputs 17~32<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (pcf8575_IN2.read(i)) {<br />
      inputState |= (1UL &lt;&lt; (i + 16));<br />
    }<br />
  }<br />
<br />
  // Control outputs 1~16<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (inputState &amp; (1UL &lt;&lt; i)) {<br />
      pcf8575_OUT1.write(i, HIGH);  // Input HIGH -&gt; Relay OFF<br />
    } else {<br />
      pcf8575_OUT1.write(i, LOW); &nbsp;&nbsp;// Input LOW -&gt; Relay ON<br />
    }<br />
  }<br />
<br />
  // Control outputs 17~32<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (inputState &amp; (1UL &lt;&lt; (i + 16))) {<br />
      pcf8575_OUT2.write(i, HIGH);  // Input HIGH -&gt; Relay OFF<br />
    } else {<br />
      pcf8575_OUT2.write(i, LOW); &nbsp;&nbsp;// Input LOW -&gt; Relay ON<br />
    }<br />
  }<br />
<br />
  delay(500);<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=7841" target="_blank" title="">6-input-trigger-output.zip</a> (Size: 1 KB / Downloads: 400)
<!-- 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=7842" target="_blank" title="">6-input-trigger-output.ino.merged.zip</a> (Size: 181.75 KB / Downloads: 402)
<!-- 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 program reads 32 input states from two PCF8575 I/O expanders<br />
 * and controls 32 relays via another two PCF8575 I/O expanders.<br />
 * When an input pin is LOW, the corresponding relay is turned ON (active LOW).<br />
 * When the input pin is HIGH, the corresponding relay is turned OFF.<br />
 *<br />
 * I2C Bus-1 Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * I2C Addresses:<br />
 * - Output1-16:  0x20<br />
 * - Output17-32: 0x21<br />
 * - Input1-16: &nbsp;&nbsp;0x24<br />
 * - Input17-32:  0x25<br />
 */<br />
<br />
#include &lt;Wire.h&gt;<br />
#include &lt;PCF8575.h&gt;<br />
<br />
// Define I2C pins<br />
#define I2C_SDA 48<br />
#define I2C_SCL 47<br />
<br />
// PCF8575 I2C addresses<br />
#define OUTPUT1_ADDR 0x20<br />
#define OUTPUT2_ADDR 0x21<br />
#define INPUT1_ADDR  0x24<br />
#define INPUT2_ADDR  0x25<br />
<br />
// Create PCF8575 objects<br />
PCF8575 pcf8575_IN1(INPUT1_ADDR); &nbsp;&nbsp;// Inputs 1~16<br />
PCF8575 pcf8575_IN2(INPUT2_ADDR); &nbsp;&nbsp;// Inputs 17~32<br />
PCF8575 pcf8575_OUT1(OUTPUT1_ADDR); // Outputs 1~16<br />
PCF8575 pcf8575_OUT2(OUTPUT2_ADDR); // Outputs 17~32<br />
<br />
void setup() {<br />
  // Initialize I2C with defined SDA and SCL<br />
  Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
  // Start serial communication<br />
  Serial.begin(115200);<br />
<br />
  // Initialize all PCF8575 devices<br />
  pcf8575_IN1.begin();<br />
  pcf8575_IN2.begin();<br />
  pcf8575_OUT1.begin();<br />
  pcf8575_OUT2.begin();<br />
<br />
  // Turn off all relays at start (LOW = OFF)<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    pcf8575_OUT1.write(i, HIGH);  // HIGH means OFF for relay<br />
    pcf8575_OUT2.write(i, HIGH);<br />
  }<br />
<br />
  Serial.println("System started: 32 inputs controlling 32 relays");<br />
}<br />
<br />
void loop() {<br />
  uint32_t inputState = 0;<br />
<br />
  // Read inputs 1~16<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (pcf8575_IN1.read(i)) {<br />
      inputState |= (1UL &lt;&lt; i);<br />
    }<br />
  }<br />
<br />
  // Read inputs 17~32<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (pcf8575_IN2.read(i)) {<br />
      inputState |= (1UL &lt;&lt; (i + 16));<br />
    }<br />
  }<br />
<br />
  // Control outputs 1~16<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (inputState &amp; (1UL &lt;&lt; i)) {<br />
      pcf8575_OUT1.write(i, HIGH);  // Input HIGH -&gt; Relay OFF<br />
    } else {<br />
      pcf8575_OUT1.write(i, LOW); &nbsp;&nbsp;// Input LOW -&gt; Relay ON<br />
    }<br />
  }<br />
<br />
  // Control outputs 17~32<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    if (inputState &amp; (1UL &lt;&lt; (i + 16))) {<br />
      pcf8575_OUT2.write(i, HIGH);  // Input HIGH -&gt; Relay OFF<br />
    } else {<br />
      pcf8575_OUT2.write(i, LOW); &nbsp;&nbsp;// Input LOW -&gt; Relay ON<br />
    }<br />
  }<br />
<br />
  delay(500);<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=7841" target="_blank" title="">6-input-trigger-output.zip</a> (Size: 1 KB / Downloads: 400)
<!-- 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=7842" target="_blank" title="">6-input-trigger-output.ino.merged.zip</a> (Size: 181.75 KB / Downloads: 402)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-05 Ethernet W5500 chip work with TCP Server mode]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8244</link>
			<pubDate>Mon, 23 Jun 2025 13:25:02 +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=8244</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=7839" target="_blank" title="">5-Ethernet-W5500.zip</a> (Size: 1.23 KB / Downloads: 390)
<!-- 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=7840" target="_blank" title="">5-Ethernet-W5500.ino.merged.zip</a> (Size: 191.08 KB / Downloads: 369)
<!-- 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=7839" target="_blank" title="">5-Ethernet-W5500.zip</a> (Size: 1.23 KB / Downloads: 390)
<!-- 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=7840" target="_blank" title="">5-Ethernet-W5500.ino.merged.zip</a> (Size: 191.08 KB / Downloads: 369)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-04 Read free GPIO state]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8243</link>
			<pubDate>Mon, 23 Jun 2025 13:23:13 +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=8243</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 />
 * GPIO Status Monitoring<br />
 *<br />
 * This program monitors the status (high or low) of multiple GPIO pins on the ESP32-S3.<br />
 * It prints the status of the pins to the serial monitor whenever a change is detected.<br />
 *<br />
 * GPIO Pins Monitored:<br />
 * - GPIO 8<br />
 * - GPIO 9<br />
 * - GPIO 10<br />
 * - GPIO 15<br />
 * - GPIO 16<br />
 * - GPIO 17<br />
 * - GPIO 18<br />
 * - GPIO 0<br />
 *<br />
 * Hardware Requirements:<br />
 * - Connect the pins to appropriate devices or pull them to HIGH/LOW for testing<br />
 */<br />
<br />
#define GPIO_PIN_8 8<br />
#define GPIO_PIN_9 9<br />
#define GPIO_PIN_10 10<br />
#define GPIO_PIN_15 15<br />
#define GPIO_PIN_16 16<br />
#define GPIO_PIN_17 17<br />
#define GPIO_PIN_18 18<br />
#define GPIO_PIN_0 0<br />
<br />
// Store the previous state of the GPIO pins<br />
bool prevState[8] = {false, false, false, false, false, false, false, false};<br />
<br />
void setup() {<br />
  // Initialize serial communication for debugging purposes<br />
  Serial.begin(115200); // Initialize the serial monitor at 115200 baud<br />
  while (!Serial);      // Wait for the serial monitor to open<br />
<br />
  // Initialize GPIO pins as inputs<br />
  pinMode(GPIO_PIN_8, INPUT);<br />
  pinMode(GPIO_PIN_9, INPUT);<br />
  pinMode(GPIO_PIN_10, INPUT);<br />
  pinMode(GPIO_PIN_15, INPUT);<br />
  pinMode(GPIO_PIN_16, INPUT);<br />
  pinMode(GPIO_PIN_17, INPUT);<br />
  pinMode(GPIO_PIN_18, INPUT);<br />
  pinMode(GPIO_PIN_0, INPUT);<br />
<br />
  Serial.println("GPIO Status Monitoring Started");<br />
}<br />
<br />
void loop() {<br />
  // Read the current state of each GPIO pin<br />
  bool currentState[8];<br />
  currentState[0] = digitalRead(GPIO_PIN_8);<br />
  currentState[1] = digitalRead(GPIO_PIN_9);<br />
  currentState[2] = digitalRead(GPIO_PIN_10);<br />
  currentState[3] = digitalRead(GPIO_PIN_15);<br />
  currentState[4] = digitalRead(GPIO_PIN_16);<br />
  currentState[5] = digitalRead(GPIO_PIN_17);<br />
  currentState[6] = digitalRead(GPIO_PIN_18);<br />
  currentState[7] = digitalRead(GPIO_PIN_0);<br />
<br />
  // Check for changes in GPIO pin states<br />
  for (int i = 0; i &lt; 8; i++) {<br />
    if (currentState[i] != prevState[i]) {<br />
      // Print the pin number and its new state if it has changed<br />
      Serial.print("GPIO ");<br />
      Serial.print(i == 0 ? GPIO_PIN_8 : <br />
                 &nbsp;&nbsp;i == 1 ? GPIO_PIN_9 : <br />
                 &nbsp;&nbsp;i == 2 ? GPIO_PIN_10 : <br />
                 &nbsp;&nbsp;i == 3 ? GPIO_PIN_15 : <br />
                 &nbsp;&nbsp;i == 4 ? GPIO_PIN_16 : <br />
                 &nbsp;&nbsp;i == 5 ? GPIO_PIN_17 : <br />
                 &nbsp;&nbsp;i == 6 ? GPIO_PIN_18 : GPIO_PIN_0);<br />
      Serial.print(" changed to ");<br />
      Serial.println(currentState[i] ? "HIGH" : "LOW");<br />
      // Update the previous state<br />
      prevState[i] = currentState[i];<br />
    }<br />
  }<br />
<br />
  // Delay to avoid flooding the serial monitor<br />
  delay(100); // Adjust the delay as needed<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=7837" target="_blank" title="">4-free-gpio-state.zip</a> (Size: 1.04 KB / Downloads: 393)
<!-- 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=7838" target="_blank" title="">4-free-gpio-state.ino.merged.zip</a> (Size: 181.77 KB / Downloads: 405)
<!-- 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 />
 * GPIO Status Monitoring<br />
 *<br />
 * This program monitors the status (high or low) of multiple GPIO pins on the ESP32-S3.<br />
 * It prints the status of the pins to the serial monitor whenever a change is detected.<br />
 *<br />
 * GPIO Pins Monitored:<br />
 * - GPIO 8<br />
 * - GPIO 9<br />
 * - GPIO 10<br />
 * - GPIO 15<br />
 * - GPIO 16<br />
 * - GPIO 17<br />
 * - GPIO 18<br />
 * - GPIO 0<br />
 *<br />
 * Hardware Requirements:<br />
 * - Connect the pins to appropriate devices or pull them to HIGH/LOW for testing<br />
 */<br />
<br />
#define GPIO_PIN_8 8<br />
#define GPIO_PIN_9 9<br />
#define GPIO_PIN_10 10<br />
#define GPIO_PIN_15 15<br />
#define GPIO_PIN_16 16<br />
#define GPIO_PIN_17 17<br />
#define GPIO_PIN_18 18<br />
#define GPIO_PIN_0 0<br />
<br />
// Store the previous state of the GPIO pins<br />
bool prevState[8] = {false, false, false, false, false, false, false, false};<br />
<br />
void setup() {<br />
  // Initialize serial communication for debugging purposes<br />
  Serial.begin(115200); // Initialize the serial monitor at 115200 baud<br />
  while (!Serial);      // Wait for the serial monitor to open<br />
<br />
  // Initialize GPIO pins as inputs<br />
  pinMode(GPIO_PIN_8, INPUT);<br />
  pinMode(GPIO_PIN_9, INPUT);<br />
  pinMode(GPIO_PIN_10, INPUT);<br />
  pinMode(GPIO_PIN_15, INPUT);<br />
  pinMode(GPIO_PIN_16, INPUT);<br />
  pinMode(GPIO_PIN_17, INPUT);<br />
  pinMode(GPIO_PIN_18, INPUT);<br />
  pinMode(GPIO_PIN_0, INPUT);<br />
<br />
  Serial.println("GPIO Status Monitoring Started");<br />
}<br />
<br />
void loop() {<br />
  // Read the current state of each GPIO pin<br />
  bool currentState[8];<br />
  currentState[0] = digitalRead(GPIO_PIN_8);<br />
  currentState[1] = digitalRead(GPIO_PIN_9);<br />
  currentState[2] = digitalRead(GPIO_PIN_10);<br />
  currentState[3] = digitalRead(GPIO_PIN_15);<br />
  currentState[4] = digitalRead(GPIO_PIN_16);<br />
  currentState[5] = digitalRead(GPIO_PIN_17);<br />
  currentState[6] = digitalRead(GPIO_PIN_18);<br />
  currentState[7] = digitalRead(GPIO_PIN_0);<br />
<br />
  // Check for changes in GPIO pin states<br />
  for (int i = 0; i &lt; 8; i++) {<br />
    if (currentState[i] != prevState[i]) {<br />
      // Print the pin number and its new state if it has changed<br />
      Serial.print("GPIO ");<br />
      Serial.print(i == 0 ? GPIO_PIN_8 : <br />
                 &nbsp;&nbsp;i == 1 ? GPIO_PIN_9 : <br />
                 &nbsp;&nbsp;i == 2 ? GPIO_PIN_10 : <br />
                 &nbsp;&nbsp;i == 3 ? GPIO_PIN_15 : <br />
                 &nbsp;&nbsp;i == 4 ? GPIO_PIN_16 : <br />
                 &nbsp;&nbsp;i == 5 ? GPIO_PIN_17 : <br />
                 &nbsp;&nbsp;i == 6 ? GPIO_PIN_18 : GPIO_PIN_0);<br />
      Serial.print(" changed to ");<br />
      Serial.println(currentState[i] ? "HIGH" : "LOW");<br />
      // Update the previous state<br />
      prevState[i] = currentState[i];<br />
    }<br />
  }<br />
<br />
  // Delay to avoid flooding the serial monitor<br />
  delay(100); // Adjust the delay as needed<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=7837" target="_blank" title="">4-free-gpio-state.zip</a> (Size: 1.04 KB / Downloads: 393)
<!-- 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=7838" target="_blank" title="">4-free-gpio-state.ino.merged.zip</a> (Size: 181.77 KB / Downloads: 405)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-03 RS485 communication test]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8242</link>
			<pubDate>Mon, 23 Jun 2025 13:22:05 +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=8242</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 with Direction Control (SP3485EEN)<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 13, RXD is GPIO 21, and EN is GPIO 14.<br />
 */<br />
<br />
#include &lt;HardwareSerial.h&gt;<br />
<br />
// Define RS485 pins<br />
#define RS485_RXD 21   &nbsp;&nbsp;// RS485 Receive<br />
#define RS485_TXD 13   &nbsp;&nbsp;// RS485 Transmit<br />
#define RS485_EN  14   &nbsp;&nbsp;// RS485 Direction control (High: Send, Low: Receive)<br />
<br />
// Create a hardware serial object on UART1<br />
HardwareSerial rs485Serial(1);<br />
<br />
void setup() {<br />
  // Start serial communication for debugging<br />
  Serial.begin(115200);<br />
  while (!Serial);<br />
<br />
  // Set RS485 direction control pin<br />
  pinMode(RS485_EN, OUTPUT);<br />
  digitalWrite(RS485_EN, LOW); // Start in receive mode<br />
<br />
  // Initialize RS485 serial communication<br />
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);<br />
<br />
  Serial.println("RS485 Test Start (with direction control)");<br />
}<br />
<br />
void loop() {<br />
  // Prepare the message to send<br />
  String message = "Hello from KinCony T32M!";<br />
  <br />
  // Switch to transmit mode<br />
  digitalWrite(RS485_EN, HIGH);<br />
  delay(2); // Short delay to allow driver to switch<br />
  <br />
  // Send the message<br />
  rs485Serial.println(message);<br />
  rs485Serial.flush(); // Wait for transmission to complete<br />
  <br />
  // Switch back to receive mode<br />
  digitalWrite(RS485_EN, LOW);<br />
  <br />
  Serial.println("Message sent. Waiting for response...");<br />
<br />
  // Wait for a response (up to 1 second)<br />
  unsigned long startTime = millis();<br />
  while (millis() - startTime &lt; 1000) {<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 />
      break;<br />
    }<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=7835" target="_blank" title="">3-RS485-Test.zip</a> (Size: 1.02 KB / Downloads: 422)
<!-- 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=7836" target="_blank" title="">3-RS485-Test.ino.merged.zip</a> (Size: 186.67 KB / Downloads: 431)
<!-- 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 with Direction Control (SP3485EEN)<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 13, RXD is GPIO 21, and EN is GPIO 14.<br />
 */<br />
<br />
#include &lt;HardwareSerial.h&gt;<br />
<br />
// Define RS485 pins<br />
#define RS485_RXD 21   &nbsp;&nbsp;// RS485 Receive<br />
#define RS485_TXD 13   &nbsp;&nbsp;// RS485 Transmit<br />
#define RS485_EN  14   &nbsp;&nbsp;// RS485 Direction control (High: Send, Low: Receive)<br />
<br />
// Create a hardware serial object on UART1<br />
HardwareSerial rs485Serial(1);<br />
<br />
void setup() {<br />
  // Start serial communication for debugging<br />
  Serial.begin(115200);<br />
  while (!Serial);<br />
<br />
  // Set RS485 direction control pin<br />
  pinMode(RS485_EN, OUTPUT);<br />
  digitalWrite(RS485_EN, LOW); // Start in receive mode<br />
<br />
  // Initialize RS485 serial communication<br />
  rs485Serial.begin(9600, SERIAL_8N1, RS485_RXD, RS485_TXD);<br />
<br />
  Serial.println("RS485 Test Start (with direction control)");<br />
}<br />
<br />
void loop() {<br />
  // Prepare the message to send<br />
  String message = "Hello from KinCony T32M!";<br />
  <br />
  // Switch to transmit mode<br />
  digitalWrite(RS485_EN, HIGH);<br />
  delay(2); // Short delay to allow driver to switch<br />
  <br />
  // Send the message<br />
  rs485Serial.println(message);<br />
  rs485Serial.flush(); // Wait for transmission to complete<br />
  <br />
  // Switch back to receive mode<br />
  digitalWrite(RS485_EN, LOW);<br />
  <br />
  Serial.println("Message sent. Waiting for response...");<br />
<br />
  // Wait for a response (up to 1 second)<br />
  unsigned long startTime = millis();<br />
  while (millis() - startTime &lt; 1000) {<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 />
      break;<br />
    }<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=7835" target="_blank" title="">3-RS485-Test.zip</a> (Size: 1.02 KB / Downloads: 422)
<!-- 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=7836" target="_blank" title="">3-RS485-Test.ino.merged.zip</a> (Size: 186.67 KB / Downloads: 431)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-02 Read digital input ports state]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8241</link>
			<pubDate>Mon, 23 Jun 2025 13:20:52 +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=8241</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 the state of two 16-channel PCF8575 I/O expanders<br />
 * and prints the combined state of all 32 input pins to the Serial Monitor.<br />
 * Each pin state is represented as a bit in a 32-bit value (printed in binary format).<br />
 * <br />
 * Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * PCF8575 I2C Addresses:<br />
 * - 0x24: input pins 1~16<br />
 * - 0x25: input pins 17~32<br />
 */<br />
<br />
#include "Arduino.h"<br />
#include "PCF8575.h"<br />
#include &lt;Wire.h&gt;<br />
<br />
// Define I2C pins<br />
#define I2C_SDA 48  // SDA pin<br />
#define I2C_SCL 47  // SCL pin<br />
<br />
// Create PCF8575 instances<br />
PCF8575 pcf8575_IN1(0x24); // Inputs 1~16<br />
PCF8575 pcf8575_IN2(0x25); // Inputs 17~32<br />
<br />
void setup() {<br />
    Serial.begin(115200);<br />
<br />
    // Initialize I2C with custom SDA and SCL<br />
    Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
    // Initialize both PCF8575 expanders<br />
    pcf8575_IN1.begin();<br />
    pcf8575_IN2.begin();<br />
<br />
    Serial.println("KinCony F32 32 channel input state 0:ON  1:OFF");<br />
}<br />
<br />
void loop() {<br />
    uint32_t inputState = 0; // 32-bit variable to store combined state<br />
<br />
    // Read input pins 1~16<br />
    for (int pin = 0; pin &lt; 16; pin++) {<br />
        if (pcf8575_IN1.read(pin)) {<br />
            inputState |= (1UL &lt;&lt; pin); // Set corresponding bit<br />
        }<br />
    }<br />
<br />
    // Read input pins 17~32<br />
    for (int pin = 0; pin &lt; 16; pin++) {<br />
        if (pcf8575_IN2.read(pin)) {<br />
            inputState |= (1UL &lt;&lt; (pin + 16)); // Set corresponding bit<br />
        }<br />
    }<br />
<br />
    Serial.print("Input state: ");<br />
    for (int i = 31; i &gt;= 0; i--) {<br />
        Serial.print(bitRead(inputState, i));<br />
    }<br />
    Serial.println();<br />
<br />
    delay(500); // Wait for 500 milliseconds<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=7833" target="_blank" title="">2-digital-input.zip</a> (Size: 907 bytes / Downloads: 382)
<!-- 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=7834" target="_blank" title="">2-digital-input.ino.merged.zip</a> (Size: 192.33 KB / Downloads: 413)
<!-- 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 the state of two 16-channel PCF8575 I/O expanders<br />
 * and prints the combined state of all 32 input pins to the Serial Monitor.<br />
 * Each pin state is represented as a bit in a 32-bit value (printed in binary format).<br />
 * <br />
 * Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * PCF8575 I2C Addresses:<br />
 * - 0x24: input pins 1~16<br />
 * - 0x25: input pins 17~32<br />
 */<br />
<br />
#include "Arduino.h"<br />
#include "PCF8575.h"<br />
#include &lt;Wire.h&gt;<br />
<br />
// Define I2C pins<br />
#define I2C_SDA 48  // SDA pin<br />
#define I2C_SCL 47  // SCL pin<br />
<br />
// Create PCF8575 instances<br />
PCF8575 pcf8575_IN1(0x24); // Inputs 1~16<br />
PCF8575 pcf8575_IN2(0x25); // Inputs 17~32<br />
<br />
void setup() {<br />
    Serial.begin(115200);<br />
<br />
    // Initialize I2C with custom SDA and SCL<br />
    Wire.begin(I2C_SDA, I2C_SCL);<br />
<br />
    // Initialize both PCF8575 expanders<br />
    pcf8575_IN1.begin();<br />
    pcf8575_IN2.begin();<br />
<br />
    Serial.println("KinCony F32 32 channel input state 0:ON  1:OFF");<br />
}<br />
<br />
void loop() {<br />
    uint32_t inputState = 0; // 32-bit variable to store combined state<br />
<br />
    // Read input pins 1~16<br />
    for (int pin = 0; pin &lt; 16; pin++) {<br />
        if (pcf8575_IN1.read(pin)) {<br />
            inputState |= (1UL &lt;&lt; pin); // Set corresponding bit<br />
        }<br />
    }<br />
<br />
    // Read input pins 17~32<br />
    for (int pin = 0; pin &lt; 16; pin++) {<br />
        if (pcf8575_IN2.read(pin)) {<br />
            inputState |= (1UL &lt;&lt; (pin + 16)); // Set corresponding bit<br />
        }<br />
    }<br />
<br />
    Serial.print("Input state: ");<br />
    for (int i = 31; i &gt;= 0; i--) {<br />
        Serial.print(bitRead(inputState, i));<br />
    }<br />
    Serial.println();<br />
<br />
    delay(500); // Wait for 500 milliseconds<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=7833" target="_blank" title="">2-digital-input.zip</a> (Size: 907 bytes / Downloads: 382)
<!-- 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=7834" target="_blank" title="">2-digital-input.ino.merged.zip</a> (Size: 192.33 KB / Downloads: 413)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[arduino code examples for T32M]-01 Turn ON/OFF OUTPUT]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8240</link>
			<pubDate>Mon, 23 Jun 2025 13:18:42 +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=8240</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 program controls a 32-channel relay board via two PCF8575 I/O expanders.<br />
 * It sequentially turns on each relay (1~32) and then turns them off in a loop.<br />
 * <br />
 * Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * PCF8575 I2C Addresses:<br />
 * - 0x20: controls relays 1~16<br />
 * - 0x21: controls relays 17~32<br />
 * <br />
 * Delay Time:<br />
 * - 200 milliseconds between switching relays<br />
 */<br />
<br />
#include &lt;Wire.h&gt;        // Include the Wire library for I2C communication<br />
#include &lt;PCF8575.h&gt;   &nbsp;&nbsp;// Include the PCF8575 library to control the I/O expander<br />
<br />
#define SDA_PIN 48         &nbsp;&nbsp;// Define the SDA pin<br />
#define SCL_PIN 47         &nbsp;&nbsp;// Define the SCL pin<br />
#define DELAY_TIME 200     &nbsp;&nbsp;// Define the delay time in milliseconds<br />
<br />
// Set I2C addresses of the PCF8575 modules<br />
#define I2C_ADDRESS1 0x20    // PCF8575 for relays 1~16<br />
#define I2C_ADDRESS2 0x21    // PCF8575 for relays 17~32<br />
<br />
// Create PCF8575 objects for each module<br />
PCF8575 pcf8575_R1(I2C_ADDRESS1); // For relays 1~16<br />
PCF8575 pcf8575_R2(I2C_ADDRESS2); // For relays 17~32<br />
<br />
void setup() {<br />
  // Initialize I2C communication<br />
  Wire.begin(SDA_PIN, SCL_PIN);<br />
<br />
  // Initialize serial communication for debugging (optional)<br />
  Serial.begin(115200);<br />
  Serial.println("PCF8575 32-Channel Relay Control: Starting...");<br />
<br />
  // Initialize both PCF8575 modules<br />
  pcf8575_R1.begin();<br />
  pcf8575_R2.begin();<br />
<br />
  // Turn off all relays initially (set all pins HIGH)<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    pcf8575_R1.write(i, HIGH); // Relays 1~16<br />
    pcf8575_R2.write(i, HIGH); // Relays 17~32<br />
  }<br />
}<br />
<br />
void loop() {<br />
  // Sequentially turn on each relay (1~32)<br />
  for (int i = 0; i &lt; 32; i++) {<br />
    if (i &lt; 16) {<br />
      pcf8575_R1.write(i, LOW);  // Turn on relay 1~16<br />
    } else {<br />
      pcf8575_R2.write(i - 16, LOW); // Turn on relay 17~32<br />
    }<br />
    delay(DELAY_TIME);<br />
  }<br />
<br />
  // Sequentially turn off each relay (1~32)<br />
  for (int i = 0; i &lt; 32; i++) {<br />
    if (i &lt; 16) {<br />
      pcf8575_R1.write(i, HIGH); // Turn off relay 1~16<br />
    } else {<br />
      pcf8575_R2.write(i - 16, HIGH); // Turn off relay 17~32<br />
    }<br />
    delay(DELAY_TIME);<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=7831" target="_blank" title="">1-output.zip</a> (Size: 956 bytes / Downloads: 397)
<!-- 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=7832" target="_blank" title="">1-output.ino.merged.zip</a> (Size: 192.14 KB / Downloads: 385)
<!-- 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 program controls a 32-channel relay board via two PCF8575 I/O expanders.<br />
 * It sequentially turns on each relay (1~32) and then turns them off in a loop.<br />
 * <br />
 * Pin Definitions:<br />
 * - SDA: GPIO 48<br />
 * - SCL: GPIO 47<br />
 * <br />
 * PCF8575 I2C Addresses:<br />
 * - 0x20: controls relays 1~16<br />
 * - 0x21: controls relays 17~32<br />
 * <br />
 * Delay Time:<br />
 * - 200 milliseconds between switching relays<br />
 */<br />
<br />
#include &lt;Wire.h&gt;        // Include the Wire library for I2C communication<br />
#include &lt;PCF8575.h&gt;   &nbsp;&nbsp;// Include the PCF8575 library to control the I/O expander<br />
<br />
#define SDA_PIN 48         &nbsp;&nbsp;// Define the SDA pin<br />
#define SCL_PIN 47         &nbsp;&nbsp;// Define the SCL pin<br />
#define DELAY_TIME 200     &nbsp;&nbsp;// Define the delay time in milliseconds<br />
<br />
// Set I2C addresses of the PCF8575 modules<br />
#define I2C_ADDRESS1 0x20    // PCF8575 for relays 1~16<br />
#define I2C_ADDRESS2 0x21    // PCF8575 for relays 17~32<br />
<br />
// Create PCF8575 objects for each module<br />
PCF8575 pcf8575_R1(I2C_ADDRESS1); // For relays 1~16<br />
PCF8575 pcf8575_R2(I2C_ADDRESS2); // For relays 17~32<br />
<br />
void setup() {<br />
  // Initialize I2C communication<br />
  Wire.begin(SDA_PIN, SCL_PIN);<br />
<br />
  // Initialize serial communication for debugging (optional)<br />
  Serial.begin(115200);<br />
  Serial.println("PCF8575 32-Channel Relay Control: Starting...");<br />
<br />
  // Initialize both PCF8575 modules<br />
  pcf8575_R1.begin();<br />
  pcf8575_R2.begin();<br />
<br />
  // Turn off all relays initially (set all pins HIGH)<br />
  for (int i = 0; i &lt; 16; i++) {<br />
    pcf8575_R1.write(i, HIGH); // Relays 1~16<br />
    pcf8575_R2.write(i, HIGH); // Relays 17~32<br />
  }<br />
}<br />
<br />
void loop() {<br />
  // Sequentially turn on each relay (1~32)<br />
  for (int i = 0; i &lt; 32; i++) {<br />
    if (i &lt; 16) {<br />
      pcf8575_R1.write(i, LOW);  // Turn on relay 1~16<br />
    } else {<br />
      pcf8575_R2.write(i - 16, LOW); // Turn on relay 17~32<br />
    }<br />
    delay(DELAY_TIME);<br />
  }<br />
<br />
  // Sequentially turn off each relay (1~32)<br />
  for (int i = 0; i &lt; 32; i++) {<br />
    if (i &lt; 16) {<br />
      pcf8575_R1.write(i, HIGH); // Turn off relay 1~16<br />
    } else {<br />
      pcf8575_R2.write(i - 16, HIGH); // Turn off relay 17~32<br />
    }<br />
    delay(DELAY_TIME);<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=7831" target="_blank" title="">1-output.zip</a> (Size: 956 bytes / Downloads: 397)
<!-- 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=7832" target="_blank" title="">1-output.ino.merged.zip</a> (Size: 192.14 KB / Downloads: 385)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[T32M ESPHome yaml for home assistant]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8239</link>
			<pubDate>Mon, 23 Jun 2025 13:17: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=8239</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>esphome:<br />
  name: t32m<br />
  friendly_name: t32m<br />
<br />
esp32:<br />
  board: esp32-s3-devkitc-1<br />
  framework:<br />
    type: esp-idf<br />
<br />
# Enable logging<br />
logger:<br />
  hardware_uart: USB_SERIAL_JTAG<br />
# Enable Home Assistant API<br />
api:<br />
<br />
ethernet:<br />
  type: W5500<br />
  clk_pin: GPIO42<br />
  mosi_pin: GPIO43<br />
  miso_pin: GPIO44<br />
  cs_pin: GPIO41<br />
  interrupt_pin: GPIO2<br />
  reset_pin: GPIO1<br />
<br />
i2c:<br />
 &nbsp;&nbsp;- id: bus_a<br />
   &nbsp;&nbsp;sda: 48<br />
   &nbsp;&nbsp;scl: 47<br />
   &nbsp;&nbsp;scan: true<br />
   &nbsp;&nbsp;frequency: 400kHz<br />
<br />
pcf8574:<br />
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16<br />
    i2c_id: bus_a<br />
    address: 0x21<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_out_2'  # for output channel 17-32<br />
    i2c_id: bus_a<br />
    address: 0x20<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_in_1'  # for input channel 1-16<br />
    i2c_id: bus_a<br />
    address: 0x25<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_in_2'  # for input channel 17-32<br />
    i2c_id: bus_a<br />
    address: 0x24<br />
    pcf8575: true<br />
<br />
switch:<br />
  - platform: gpio<br />
    name: "t32m-output01"<br />
    id: "t32m_output01"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 0<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output02"<br />
    id: "t32m_output02"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 1<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output03"<br />
    id: "t32m_output03"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 2<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output04"<br />
    id: "t32m_output04"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 3<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output05"<br />
    id: "t32m_output05"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 4<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output06"<br />
    id: "t32m_output06"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 5<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output07"<br />
    id: "t32m_output07"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 6<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output08"<br />
    id: "t32m_output08"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 7<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output09"<br />
    id: "t32m_output09"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 8<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output10"<br />
    id: "t32m_output10"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 9<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output11"<br />
    id: "t32m_output11"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 10<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output12"<br />
    id: "t32m_output12"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 11<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output13"<br />
    id: "t32m_output13"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 12<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output14"<br />
    id: "t32m_output14"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 13<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output15"<br />
    id: "t32m_output15"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 14<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output16"<br />
    id: "t32m_output16"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 15<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output17"<br />
    id: "t32m_output17"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 0<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output18"<br />
    id: "t32m_output18"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 1<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output19"<br />
    id: "t32m_output19"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 2<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output20"<br />
    id: "t32m_output20"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 3<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output21"<br />
    id: "t32m_output21"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 4<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output22"<br />
    id: "t32m_output22"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 5<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output23"<br />
    id: "t32m_output23"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 6<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output24"<br />
    id: "t32m_output24"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 7<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output25"<br />
    id: "t32m_output25"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 8<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output26"<br />
    id: "t32m_output26"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 9<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output27"<br />
    id: "t32m_output27"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 10<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output28"<br />
    id: "t32m_output28"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 11<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output29"<br />
    id: "t32m_output29"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 12<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output30"<br />
    id: "t32m_output30"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 13<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output31"<br />
    id: "t32m_output31"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 14<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output32"<br />
    id: "t32m_output32"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 15<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
binary_sensor:<br />
  - platform: gpio<br />
    name: "t32m-input01"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 0<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input02"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 1<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input03"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 2<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input04"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 3<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input05"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 4<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input06"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 5<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input07"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 6<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input08"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 7<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input09"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 8<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input10"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 9<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input11"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 10<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input12"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 11<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input13"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 12<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input14"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 13<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input15"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 14<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input16"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 15<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input17"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 0<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input18"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 1<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input19"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 2<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input20"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 3<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input21"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 4<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input22"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 5<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input23"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 6<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input24"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 7<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input25"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 8<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input26"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 9<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input27"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 10<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input28"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 11<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input29"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 12<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input30"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 13<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input31"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 14<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input32"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 15<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
## pull-up resistance on PCB<br />
  - platform: gpio<br />
    name: "t32m-W1-io15"<br />
    pin: <br />
      number: 15<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io16"<br />
    pin: <br />
      number: 16<br />
      inverted: false<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io17"<br />
    pin: <br />
      number: 17<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io18"<br />
    pin: <br />
      number: 18<br />
      inverted:  false<br />
<br />
## without pull-up resistance on PCB<br />
  - platform: gpio<br />
    name: "t32m-io0"<br />
    pin: <br />
      number: 0<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io8"<br />
    pin: <br />
      number: 8<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io9"<br />
    pin: <br />
      number: 9<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io10"<br />
    pin: <br />
      number: 10<br />
      inverted:  false<br />
<br />
sensor:<br />
  - platform: adc<br />
    pin: 7<br />
    name: "t32m A1 Voltage"<br />
    update_interval: 5s<br />
    attenuation: 11db<br />
    filters:<br />
      - lambda:<br />
          if (x &gt;= 3.11) {<br />
            return x * 1.60256;<br />
          } else if (x &lt;= 0.15) {<br />
            return 0;<br />
          } else {<br />
            return x * 1.51;<br />
          }<br />
  - platform: adc<br />
    pin: 6<br />
    name: "t32m A2 Voltage"<br />
    update_interval: 5s<br />
    attenuation: 11db<br />
    filters:<br />
      # - multiply: 1.51515<br />
      - lambda:<br />
          if (x &gt;= 3.11) {<br />
            return x * 1.60256;<br />
          } else if (x &lt;= 0.15) {<br />
            return 0;<br />
          } else {<br />
            return x * 1.51;<br />
          }<br />
  - platform: adc<br />
    pin: 5<br />
    name: "t32m A3 Current"<br />
    update_interval: 5s<br />
    unit_of_measurement: mA<br />
    attenuation: 11db<br />
    filters:<br />
      - multiply: 6.66666666<br />
  - platform: adc<br />
    pin: 4<br />
    name: "t32m A4 Current"<br />
    update_interval: 5s<br />
    unit_of_measurement: mA<br />
    attenuation: 11db<br />
    filters:<br />
      - multiply: 6.66666666<br />
<br />
web_server:<br />
  port: 80</code></div></div> download yaml file: <br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7830" target="_blank" title="">T32M-HA.txt</a> (Size: 13.02 KB / Downloads: 316)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>esphome:<br />
  name: t32m<br />
  friendly_name: t32m<br />
<br />
esp32:<br />
  board: esp32-s3-devkitc-1<br />
  framework:<br />
    type: esp-idf<br />
<br />
# Enable logging<br />
logger:<br />
  hardware_uart: USB_SERIAL_JTAG<br />
# Enable Home Assistant API<br />
api:<br />
<br />
ethernet:<br />
  type: W5500<br />
  clk_pin: GPIO42<br />
  mosi_pin: GPIO43<br />
  miso_pin: GPIO44<br />
  cs_pin: GPIO41<br />
  interrupt_pin: GPIO2<br />
  reset_pin: GPIO1<br />
<br />
i2c:<br />
 &nbsp;&nbsp;- id: bus_a<br />
   &nbsp;&nbsp;sda: 48<br />
   &nbsp;&nbsp;scl: 47<br />
   &nbsp;&nbsp;scan: true<br />
   &nbsp;&nbsp;frequency: 400kHz<br />
<br />
pcf8574:<br />
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16<br />
    i2c_id: bus_a<br />
    address: 0x21<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_out_2'  # for output channel 17-32<br />
    i2c_id: bus_a<br />
    address: 0x20<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_in_1'  # for input channel 1-16<br />
    i2c_id: bus_a<br />
    address: 0x25<br />
    pcf8575: true<br />
<br />
  - id: 'pcf8574_hub_in_2'  # for input channel 17-32<br />
    i2c_id: bus_a<br />
    address: 0x24<br />
    pcf8575: true<br />
<br />
switch:<br />
  - platform: gpio<br />
    name: "t32m-output01"<br />
    id: "t32m_output01"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 0<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output02"<br />
    id: "t32m_output02"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 1<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output03"<br />
    id: "t32m_output03"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 2<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output04"<br />
    id: "t32m_output04"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 3<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output05"<br />
    id: "t32m_output05"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 4<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output06"<br />
    id: "t32m_output06"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 5<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output07"<br />
    id: "t32m_output07"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 6<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output08"<br />
    id: "t32m_output08"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 7<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output09"<br />
    id: "t32m_output09"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 8<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output10"<br />
    id: "t32m_output10"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 9<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output11"<br />
    id: "t32m_output11"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 10<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output12"<br />
    id: "t32m_output12"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 11<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output13"<br />
    id: "t32m_output13"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 12<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output14"<br />
    id: "t32m_output14"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 13<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output15"<br />
    id: "t32m_output15"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 14<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output16"<br />
    id: "t32m_output16"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_1<br />
      number: 15<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output17"<br />
    id: "t32m_output17"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 0<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output18"<br />
    id: "t32m_output18"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 1<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output19"<br />
    id: "t32m_output19"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 2<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output20"<br />
    id: "t32m_output20"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 3<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output21"<br />
    id: "t32m_output21"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 4<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output22"<br />
    id: "t32m_output22"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 5<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output23"<br />
    id: "t32m_output23"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 6<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output24"<br />
    id: "t32m_output24"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 7<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output25"<br />
    id: "t32m_output25"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 8<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output26"<br />
    id: "t32m_output26"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 9<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output27"<br />
    id: "t32m_output27"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 10<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output28"<br />
    id: "t32m_output28"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 11<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output29"<br />
    id: "t32m_output29"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 12<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output30"<br />
    id: "t32m_output30"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 13<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output31"<br />
    id: "t32m_output31"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 14<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-output32"<br />
    id: "t32m_output32"<br />
    pin:<br />
      pcf8574: pcf8574_hub_out_2<br />
      number: 15<br />
      mode: OUTPUT<br />
      inverted: true<br />
<br />
binary_sensor:<br />
  - platform: gpio<br />
    name: "t32m-input01"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 0<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input02"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 1<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input03"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 2<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input04"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 3<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input05"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 4<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input06"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 5<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input07"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 6<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input08"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 7<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input09"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 8<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input10"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 9<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input11"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 10<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input12"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 11<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input13"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 12<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input14"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 13<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input15"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 14<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input16"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_1<br />
      number: 15<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input17"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 0<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input18"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 1<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input19"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 2<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input20"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 3<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input21"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 4<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input22"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 5<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input23"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 6<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input24"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 7<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input25"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 8<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input26"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 9<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input27"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 10<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input28"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 11<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input29"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 12<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input30"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 13<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input31"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 14<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-input32"<br />
    pin:<br />
      pcf8574: pcf8574_hub_in_2<br />
      number: 15<br />
      mode: INPUT<br />
      inverted: true<br />
<br />
## pull-up resistance on PCB<br />
  - platform: gpio<br />
    name: "t32m-W1-io15"<br />
    pin: <br />
      number: 15<br />
      inverted: true<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io16"<br />
    pin: <br />
      number: 16<br />
      inverted: false<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io17"<br />
    pin: <br />
      number: 17<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-W1-io18"<br />
    pin: <br />
      number: 18<br />
      inverted:  false<br />
<br />
## without pull-up resistance on PCB<br />
  - platform: gpio<br />
    name: "t32m-io0"<br />
    pin: <br />
      number: 0<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io8"<br />
    pin: <br />
      number: 8<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io9"<br />
    pin: <br />
      number: 9<br />
      inverted:  false<br />
<br />
  - platform: gpio<br />
    name: "t32m-io10"<br />
    pin: <br />
      number: 10<br />
      inverted:  false<br />
<br />
sensor:<br />
  - platform: adc<br />
    pin: 7<br />
    name: "t32m A1 Voltage"<br />
    update_interval: 5s<br />
    attenuation: 11db<br />
    filters:<br />
      - lambda:<br />
          if (x &gt;= 3.11) {<br />
            return x * 1.60256;<br />
          } else if (x &lt;= 0.15) {<br />
            return 0;<br />
          } else {<br />
            return x * 1.51;<br />
          }<br />
  - platform: adc<br />
    pin: 6<br />
    name: "t32m A2 Voltage"<br />
    update_interval: 5s<br />
    attenuation: 11db<br />
    filters:<br />
      # - multiply: 1.51515<br />
      - lambda:<br />
          if (x &gt;= 3.11) {<br />
            return x * 1.60256;<br />
          } else if (x &lt;= 0.15) {<br />
            return 0;<br />
          } else {<br />
            return x * 1.51;<br />
          }<br />
  - platform: adc<br />
    pin: 5<br />
    name: "t32m A3 Current"<br />
    update_interval: 5s<br />
    unit_of_measurement: mA<br />
    attenuation: 11db<br />
    filters:<br />
      - multiply: 6.66666666<br />
  - platform: adc<br />
    pin: 4<br />
    name: "t32m A4 Current"<br />
    update_interval: 5s<br />
    unit_of_measurement: mA<br />
    attenuation: 11db<br />
    filters:<br />
      - multiply: 6.66666666<br />
<br />
web_server:<br />
  port: 80</code></div></div> download yaml file: <br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/txt.png" title="Text Document" border="0" alt=".txt" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7830" target="_blank" title="">T32M-HA.txt</a> (Size: 13.02 KB / Downloads: 316)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[T32M ESP32-S3 IO pins define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8238</link>
			<pubDate>Mon, 23 Jun 2025 13:14:09 +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=8238</guid>
			<description><![CDATA[analog A1 (0-5v): GPIO7<br />
analog A2 (0-5v): GPIO6<br />
analog A3 (4-20mA): GPIO5<br />
analog A4 (4-20mA): GPIO4<br />
<br />
-----------------<br />
IIC Bus-1:<br />
<br />
SDA:GPIO48<br />
SCL:GPIO47<br />
<br />
PCF8575: (output1-16): i2c address:0x20<br />
PCF8575: (output17-32): i2c address:0x21<br />
PCF8575: (input1-16): i2c address:0x24<br />
PCF8575: (input17-32): i2c address:0x25<br />
<br />
24C02 EPROM i2c address: 0x50<br />
<br />
-----------------<br />
<br />
1-wire (pull-up resistance on PCB): <br />
GPIO15<br />
GPIO16<br />
GPIO17<br />
GPIO18<br />
<br />
free GPIO:<br />
GPIO8<br />
GPIO9<br />
GPIO10<br />
<br />
-----------------<br />
<br />
Ethernet (W5500) I/O define:<br />
<br />
clk_pin: GPIO42<br />
mosi_pin: GPIO43<br />
miso_pin: GPIO44<br />
cs_pin: GPIO41<br />
<br />
interrupt_pin: GPIO2<br />
reset_pin: GPIO1<br />
<br />
--------------------<br />
RS485: <br />
RXD:GPIO21<br />
TXD:GPIO13<br />
EN:GPIO14]]></description>
			<content:encoded><![CDATA[analog A1 (0-5v): GPIO7<br />
analog A2 (0-5v): GPIO6<br />
analog A3 (4-20mA): GPIO5<br />
analog A4 (4-20mA): GPIO4<br />
<br />
-----------------<br />
IIC Bus-1:<br />
<br />
SDA:GPIO48<br />
SCL:GPIO47<br />
<br />
PCF8575: (output1-16): i2c address:0x20<br />
PCF8575: (output17-32): i2c address:0x21<br />
PCF8575: (input1-16): i2c address:0x24<br />
PCF8575: (input17-32): i2c address:0x25<br />
<br />
24C02 EPROM i2c address: 0x50<br />
<br />
-----------------<br />
<br />
1-wire (pull-up resistance on PCB): <br />
GPIO15<br />
GPIO16<br />
GPIO17<br />
GPIO18<br />
<br />
free GPIO:<br />
GPIO8<br />
GPIO9<br />
GPIO10<br />
<br />
-----------------<br />
<br />
Ethernet (W5500) I/O define:<br />
<br />
clk_pin: GPIO42<br />
mosi_pin: GPIO43<br />
miso_pin: GPIO44<br />
cs_pin: GPIO41<br />
<br />
interrupt_pin: GPIO2<br />
reset_pin: GPIO1<br />
<br />
--------------------<br />
RS485: <br />
RXD:GPIO21<br />
TXD:GPIO13<br />
EN:GPIO14]]></content:encoded>
		</item>
	</channel>
</rss>