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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 10,376
» Latest member: uu88shcom
» Forum threads: 4,311
» Forum posts: 21,277

Full Statistics

Online Users
There are currently 263 online users.
» 0 Member(s) | 244 Guest(s)
AhrefsBot, Amazonbot, Applebot, Baidu, Bing, Bytespider, Crawl, Google, PetalBot, bot

Latest Threads
ESPHome modbus not functi...
Forum: KC868-A8S
Last Post: admin
Yesterday, 01:02 PM
» Replies: 3
» Views: 619
SSD not visible for insta...
Forum: Pi5R16
Last Post: admin
10-29-2026, 12:30 PM
» Replies: 20
» Views: 901
B32M And new ESPHOME Buil...
Forum: B32M
Last Post: admin
10-29-2026, 12:29 PM
» Replies: 1
» Views: 14
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:42 AM
» Replies: 0
» Views: 5
[arduino code examples fo...
Forum: T16M
Last Post: admin
10-29-2026, 08:41 AM
» Replies: 0
» Views: 13
B8 – Defective screw term...
Forum: B8
Last Post: admin
10-28-2026, 11:57 PM
» Replies: 1
» Views: 14
[arduino code examples fo...
Forum: B2
Last Post: admin
10-28-2026, 12:53 AM
» Replies: 0
» Views: 15
[arduino code examples fo...
Forum: B2
Last Post: admin
10-28-2026, 12:50 AM
» Replies: 0
» Views: 16
KC868-A16 – KCS v2.2.20 M...
Forum: KC868-A16
Last Post: admin
10-27-2026, 11:25 PM
» Replies: 1
» Views: 51
kc868-A8S v2 not working ...
Forum: KC868-A8S
Last Post: admin
10-26-2026, 07:00 AM
» Replies: 13
» Views: 5,176

  DRV8262DDWR driver chip datasheet PDF file
Posted by: admin - 10-25-2026, 01:29 AM - Forum: MT4v2 - No Replies


.pdf   drv8262.pdf (Size: 2.79 MB / Downloads: 29)

Print this item

  N30 most recent ESPhome
Posted by: ThomasJS - 10-23-2026, 10:31 AM - Forum: N30 - Replies (1)

Hello!

I'm interested in buying the N30, but I see multiple issues on this forum about the current direction detection.

I came accross this one on the forum:
https://www.kincony.com/forum/attachment.php?aid=9375

This one is on the webshop: (i guess this is the wrong one?)
https://www.kincony.com/forum/attachment.php?aid=8460

This one on ESPHOME: (also older one?)
https://devices.esphome.io/devices/kincony-n30/

Which N30 ESPHome configuration correctly expose signed, bidirectional active power for each BL0910 CT channel?
Which is the most recent ESPHOME config?

Print this item

  KC868-A128 Arduino Demo: 128-Channel Billie Jean Light Show
Posted by: admin - 10-23-2026, 03:24 AM - Forum: KC868-A128 - No Replies

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

  KC868-A128 - 128-channel light show for YouTube Shorts.

  Effects:
  1. Meteor chase with an 8-channel tail.
  2. Two lights collide and move apart.
  3. Four synchronized chase groups.
  4. Fill and empty all 128 channels.
  5. Odd/even alternation and a flashing finale.

  Required library:
  PCF8575 by Renzo Mischianti (xreef).

  I2C SDA: GPIO5
  I2C SCL: GPIO16

  Outputs are active LOW.
  Use the onboard LEDs or suitable demonstration lights.
  The sequence includes stages with all outputs ON.
*/

#include <Arduino.h>
#include <Wire.h>
#include <PCF8575.h>

constexpr int I2C_SDA = 5;
constexpr int I2C_SCL = 16;

constexpr uint8_t CHIP_COUNT = 8;
constexpr uint8_t PINS_PER_CHIP = 16;
constexpr int CHANNEL_COUNT = 128;

// Increase this value to slow down every effect.
// Example: 150 means 1.5 times the original duration.
constexpr uint16_t SPEED_PERCENT = 100;

PCF8575 pcf1(0x24, I2C_SDA, I2C_SCL);
PCF8575 pcf2(0x25, I2C_SDA, I2C_SCL);
PCF8575 pcf3(0x21, I2C_SDA, I2C_SCL);
PCF8575 pcf4(0x22, I2C_SDA, I2C_SCL);
PCF8575 pcf5(0x26, I2C_SDA, I2C_SCL);
PCF8575 pcf6(0x27, I2C_SDA, I2C_SCL);
PCF8575 pcf7(0x20, I2C_SDA, I2C_SCL);
PCF8575 pcf8(0x23, I2C_SDA, I2C_SCL);

PCF8575* const outputs[] = {
  &pcf1, &pcf2, &pcf3, &pcf4,
  &pcf5, &pcf6, &pcf7, &pcf8
};

// Store current and requested states to avoid redundant writes.
bool currentState[CHANNEL_COUNT] = {};
bool frame[CHANNEL_COUNT] = {};

void pauseMs(uint32_t duration) {
  delay(duration * SPEED_PERCENT / 100);
}

// Channel indexes are 0-127.
void setChannel(int channel, bool on) {
  if (channel < 0 || channel >= CHANNEL_COUNT) {
    return;
  }

  if (currentState[channel] == on) {
    return;
  }

  outputs[channel / PINS_PER_CHIP]->digitalWrite(
    channel % PINS_PER_CHIP,
    on ? LOW : HIGH
  );

  currentState[channel] = on;
}

void setAll(bool on) {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, on);
  }
}

void clearFrame() {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    frame[channel] = false;
  }
}

void addLight(int channel) {
  if (channel >= 0 && channel < CHANNEL_COUNT) {
    frame[channel] = true;
  }
}

void showFrame(uint32_t duration) {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, frame[channel]);
  }

  pauseMs(duration);
}

// Move an 8-channel tail in both directions.
void meteorShow() {
  constexpr int TAIL_LENGTH = 8;

  for (int head = 0;
       head < CHANNEL_COUNT + TAIL_LENGTH;
       head++) {
    clearFrame();

    for (int tail = 0; tail < TAIL_LENGTH; tail++) {
      addLight(head - tail);
    }

    showFrame(18);
  }

  for (int head = CHANNEL_COUNT - 1;
       head >= -TAIL_LENGTH;
       head--) {
    clearFrame();

    for (int tail = 0; tail < TAIL_LENGTH; tail++) {
      addLight(head + tail);
    }

    showFrame(14);
  }
}

// Move two 4-channel beams toward the center and back.
void collisionShow() {
  for (int repeat = 0; repeat < 2; repeat++) {
    for (int position = 0; position < 64; position++) {
      clearFrame();

      for (int tail = 0; tail < 4; tail++) {
        addLight(position - tail);
        addLight(CHANNEL_COUNT - 1 - position + tail);
      }

      showFrame(18);
    }

    for (int position = 63; position >= 0; position--) {
      clearFrame();

      for (int tail = 0; tail < 4; tail++) {
        addLight(position - tail);
        addLight(CHANNEL_COUNT - 1 - position + tail);
      }

      showFrame(14);
    }
  }

  setAll(false);
}

// Run four independent 32-channel chase groups.
void fourGroupShow() {
  constexpr int GROUP_SIZE = 32;
  constexpr int TAIL_LENGTH = 4;

  for (int repeat = 0; repeat < 3; repeat++) {
    for (int step = 0; step < GROUP_SIZE; step++) {
      clearFrame();

      for (int group = 0; group < 4; group++) {
        for (int tail = 0; tail < TAIL_LENGTH; tail++) {
          int local = (step - tail + GROUP_SIZE) % GROUP_SIZE;

          // Adjacent groups move in opposite directions.
          if (group % 2 == 1) {
            local = GROUP_SIZE - 1 - local;
          }

          addLight(group * GROUP_SIZE + local);
        }
      }

      showFrame(35);
    }
  }

  setAll(false);
}

// Gradually fill the board, then empty it in the same order.
void fillShow() {
  setAll(false);

  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, true);
    pauseMs(12);
  }

  pauseMs(350);

  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, false);
    pauseMs(9);
  }

  pauseMs(150);
}

// Alternate physical channels 1/3/5... and 2/4/6...
void finaleShow() {
  for (int step = 0; step < 8; step++) {
    clearFrame();

    for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
      if ((channel % 2) == (step % 2)) {
        addLight(channel);
      }
    }

    showFrame(120);
  }

  setAll(false);
  pauseMs(150);

  for (int repeat = 0; repeat < 2; repeat++) {
    setAll(true);
    pauseMs(180);

    setAll(false);
    pauseMs(180);
  }
}

void setup() {
  Serial.begin(115200);

  // Configure every output HIGH before initializing the chips.
  for (uint8_t chip = 0; chip < CHIP_COUNT; chip++) {
    for (uint8_t pin = 0; pin < PINS_PER_CHIP; pin++) {
      outputs[chip]->pinMode(pin, OUTPUT, HIGH);
    }
  }

  for (uint8_t chip = 0; chip < CHIP_COUNT; chip++) {
    if (!outputs[chip]->begin()) {
      Serial.printf("PCF8575 group %u initialization failed.\n",
                    chip + 1);

      while (true) {
        delay(1000);
      }
    }
  }

  Serial.println("KC868-A128 light show ready.");
  pauseMs(500);
}

void loop() {
  meteorShow();
  collisionShow();
  fourGroupShow();
  fillShow();
  finaleShow();

  setAll(false);
  pauseMs(500);
}
arduino ino file download:

.zip   Billie-Jean.zip (Size: 1.96 KB / Downloads: 33)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   Billie-Jean.ino.merged.zip (Size: 186.24 KB / Downloads: 31)

Print this item

  KC868-A128 Arduino Chasing Lights Demo – 128-Channel LED Effects
Posted by: admin - 10-23-2026, 03:23 AM - Forum: KC868-A128 - No Replies

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

  KC868-A128 - 128-channel light show for YouTube Shorts.

  Effects:
  1. Meteor chase with an 8-channel tail.
  2. Two lights collide and move apart.
  3. Four synchronized chase groups.
  4. Fill and empty all 128 channels.
  5. Odd/even alternation and a flashing finale.

  Required library:
  PCF8575 by Renzo Mischianti (xreef).

  I2C SDA: GPIO5
  I2C SCL: GPIO16

  Outputs are active LOW.
  Use the onboard LEDs or suitable demonstration lights.
  The sequence includes stages with all outputs ON.
*/

#include <Arduino.h>
#include <Wire.h>
#include <PCF8575.h>

constexpr int I2C_SDA = 5;
constexpr int I2C_SCL = 16;

constexpr uint8_t CHIP_COUNT = 8;
constexpr uint8_t PINS_PER_CHIP = 16;
constexpr int CHANNEL_COUNT = 128;

// Increase this value to slow down every effect.
// Example: 150 means 1.5 times the original duration.
constexpr uint16_t SPEED_PERCENT = 100;

PCF8575 pcf1(0x24, I2C_SDA, I2C_SCL);
PCF8575 pcf2(0x25, I2C_SDA, I2C_SCL);
PCF8575 pcf3(0x21, I2C_SDA, I2C_SCL);
PCF8575 pcf4(0x22, I2C_SDA, I2C_SCL);
PCF8575 pcf5(0x26, I2C_SDA, I2C_SCL);
PCF8575 pcf6(0x27, I2C_SDA, I2C_SCL);
PCF8575 pcf7(0x20, I2C_SDA, I2C_SCL);
PCF8575 pcf8(0x23, I2C_SDA, I2C_SCL);

PCF8575* const outputs[] = {
  &pcf1, &pcf2, &pcf3, &pcf4,
  &pcf5, &pcf6, &pcf7, &pcf8
};

// Store current and requested states to avoid redundant writes.
bool currentState[CHANNEL_COUNT] = {};
bool frame[CHANNEL_COUNT] = {};

void pauseMs(uint32_t duration) {
  delay(duration * SPEED_PERCENT / 100);
}

// Channel indexes are 0-127.
void setChannel(int channel, bool on) {
  if (channel < 0 || channel >= CHANNEL_COUNT) {
    return;
  }

  if (currentState[channel] == on) {
    return;
  }

  outputs[channel / PINS_PER_CHIP]->digitalWrite(
    channel % PINS_PER_CHIP,
    on ? LOW : HIGH
  );

  currentState[channel] = on;
}

void setAll(bool on) {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, on);
  }
}

void clearFrame() {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    frame[channel] = false;
  }
}

void addLight(int channel) {
  if (channel >= 0 && channel < CHANNEL_COUNT) {
    frame[channel] = true;
  }
}

void showFrame(uint32_t duration) {
  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, frame[channel]);
  }

  pauseMs(duration);
}

// Move an 8-channel tail in both directions.
void meteorShow() {
  constexpr int TAIL_LENGTH = 8;

  for (int head = 0;
       head < CHANNEL_COUNT + TAIL_LENGTH;
       head++) {
    clearFrame();

    for (int tail = 0; tail < TAIL_LENGTH; tail++) {
      addLight(head - tail);
    }

    showFrame(18);
  }

  for (int head = CHANNEL_COUNT - 1;
       head >= -TAIL_LENGTH;
       head--) {
    clearFrame();

    for (int tail = 0; tail < TAIL_LENGTH; tail++) {
      addLight(head + tail);
    }

    showFrame(14);
  }
}

// Move two 4-channel beams toward the center and back.
void collisionShow() {
  for (int repeat = 0; repeat < 2; repeat++) {
    for (int position = 0; position < 64; position++) {
      clearFrame();

      for (int tail = 0; tail < 4; tail++) {
        addLight(position - tail);
        addLight(CHANNEL_COUNT - 1 - position + tail);
      }

      showFrame(18);
    }

    for (int position = 63; position >= 0; position--) {
      clearFrame();

      for (int tail = 0; tail < 4; tail++) {
        addLight(position - tail);
        addLight(CHANNEL_COUNT - 1 - position + tail);
      }

      showFrame(14);
    }
  }

  setAll(false);
}

// Run four independent 32-channel chase groups.
void fourGroupShow() {
  constexpr int GROUP_SIZE = 32;
  constexpr int TAIL_LENGTH = 4;

  for (int repeat = 0; repeat < 3; repeat++) {
    for (int step = 0; step < GROUP_SIZE; step++) {
      clearFrame();

      for (int group = 0; group < 4; group++) {
        for (int tail = 0; tail < TAIL_LENGTH; tail++) {
          int local = (step - tail + GROUP_SIZE) % GROUP_SIZE;

          // Adjacent groups move in opposite directions.
          if (group % 2 == 1) {
            local = GROUP_SIZE - 1 - local;
          }

          addLight(group * GROUP_SIZE + local);
        }
      }

      showFrame(35);
    }
  }

  setAll(false);
}

// Gradually fill the board, then empty it in the same order.
void fillShow() {
  setAll(false);

  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, true);
    pauseMs(12);
  }

  pauseMs(350);

  for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
    setChannel(channel, false);
    pauseMs(9);
  }

  pauseMs(150);
}

// Alternate physical channels 1/3/5... and 2/4/6...
void finaleShow() {
  for (int step = 0; step < 8; step++) {
    clearFrame();

    for (int channel = 0; channel < CHANNEL_COUNT; channel++) {
      if ((channel % 2) == (step % 2)) {
        addLight(channel);
      }
    }

    showFrame(120);
  }

  setAll(false);
  pauseMs(150);

  for (int repeat = 0; repeat < 2; repeat++) {
    setAll(true);
    pauseMs(180);

    setAll(false);
    pauseMs(180);
  }
}

void setup() {
  Serial.begin(115200);

  // Configure every output HIGH before initializing the chips.
  for (uint8_t chip = 0; chip < CHIP_COUNT; chip++) {
    for (uint8_t pin = 0; pin < PINS_PER_CHIP; pin++) {
      outputs[chip]->pinMode(pin, OUTPUT, HIGH);
    }
  }

  for (uint8_t chip = 0; chip < CHIP_COUNT; chip++) {
    if (!outputs[chip]->begin()) {
      Serial.printf("PCF8575 group %u initialization failed.\n",
                    chip + 1);

      while (true) {
        delay(1000);
      }
    }
  }

  Serial.println("KC868-A128 light show ready.");
  pauseMs(500);
}

void loop() {
  meteorShow();
  collisionShow();
  fourGroupShow();
  fillShow();
  finaleShow();

  setAll(false);
  pauseMs(500);
}
arduino ino file download:

.zip   LED.zip (Size: 1.95 KB / Downloads: 30)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:

.zip   LED.ino.merged.zip (Size: 186.24 KB / Downloads: 28)

Print this item

Photo Which KinCony board for a 12 V locking toolbox with Home Assistant, Wi-Fi and
Posted by: Kiwoneka - 10-20-2026, 07:33 PM - Forum: DIY Project - Replies (3)

Hello KinCony team,

I’m building a large steel mechanics’ toolbox for my workshop in Leeds, UK. It has an electric lock, and I’d like one KinCony board to be its controller. I looked at your product selector but I’m not sure which board fits, so here’s what the system needs to do.

What the box does

A small 12 V DC motor (a linear actuator) moves a bar that locks and unlocks all the drawers. It changes direction when you reverse its power (+/−). It has its own end-stop switches, so it stops by itself at each end. It draws less than 1 A.
A wireless key fob unlocks and locks the box. The fob receiver gives a simple relay contact (on/off).
A chain of 7 small switches tells us whether every drawer is fully closed and caught. It gives one contact: closed = all locked.
A green LED on the outside shows “locked”.
There’s also a normal mechanical key, so the electronics never have to be perfect.

What I want the KinCony board to do

Run with Home Assistant (on the board itself, or connected to Home Assistant on my network).
Wi-Fi to connect to my network. The board sits inside a closed steel box, so an external antenna connector matters.
Bluetooth, so the box can tell when my phone is close by (auto-lock when I walk away).
Drive the 12 V motor in both directions (lock and unlock), using relays or a motor driver output.
Read at least 2 inputs: the fob receiver contact and the “all drawers locked” contact.
Run from 12 V DC and use as little power as possible when idle. When mains power is off, the box runs on a Milwaukee M18 battery, so idle power decides how long the battery lasts.
Stay safe at power-up: after a power cut, the board must not unlock the box when power comes back.

Power side (only if you have something suitable)
The box has mains power plus a battery backup. At the moment I plan to use Mean Well parts to switch automatically between the mains 12 V supply and the battery 12 V. If KinCony makes a dual-power / automatic changeover module or a 12 V UPS-type module, please tell me.

Space
The electronics sit in a hidden compartment about 97 mm high. The board can lie flat or go on a DIN rail.

My questions

Which KinCony board do you recommend for this? I’ve looked at the MT4 and the Pi-based boards (Pi5R8, Server-Mini). Are those right, or is there a better fit?
Does that board have Wi-Fi, Bluetooth and an external antenna option?
Can it reverse a 12 V DC motor, or do I need an extra module?
What’s its idle power at 12 V?
What do its relays do at power-up (all off)?
Do you have a dual-power changeover or 12 V backup module?
Price and shipping to the UK, please.

I can share drawings and a 3D model if that helps. Thank you!



Attached Files Thumbnail(s)
   
Print this item

  KC868-AP – max current per channel and per Vin terminal (current hardware version)
Posted by: andrzejbiardzki - 10-20-2026, 08:33 AM - Forum: KC868-AP / ADR - Replies (4)

Hello,

I'm planning to buy the KC868-AP (16-channel PWM dimmer) and I want to make sure I size my LED strips correctly. I've found different values on your website and forum, so could you please confirm the limits for the CURRENT hardware version?

1. Max continuous current per PWM channel: is it 3A (as on the product page) or 10A (MOSFET, as mentioned on the forum in 2025)? What is the recommended safe continuous current per channel?

2. The board has two "12V/24V" input terminals, each feeding 8 PWM channels. What is the max continuous current for each of these terminals (total for its group of 8 channels)?

3. Max total current for the whole board (all 16 channels at 100% at the same time)?

4. Does the board need extra cooling at high load, or should I derate the current?

5. Which hardware version is currently shipped, and are there any differences from older versions?

My setup: 24V DC, single-color LED strips, approx. [50W] W per channel, [400] W total.

Thank you!

Print this item

  MT4v2 Driver Board Web Tool
Posted by: admin - 10-20-2026, 03:37 AM - Forum: MT4v2 - No Replies

download: 
.html   MT4V2_Driver_Board_Web.html (Size: 11.16 KB / Downloads: 43)

Print this item

  ARM CPU Modbus communication protocol
Posted by: admin - 10-20-2026, 03:36 AM - Forum: MT4v2 - No Replies

download: 
.html   MT4V2 Driver Board Tutorial.html (Size: 14.42 KB / Downloads: 46)

Print this item

  [arduino code examples for MT4v2]-11 IR receiver decode
Posted by: admin - 10-20-2026, 03:35 AM - Forum: MT4v2 - No Replies

Code:
/*
* SimpleReceiver.cpp
*
* Demonstrates receiving ONLY NEC protocol IR codes with IRremote
* If no protocol is defined, all protocols (except Bang&Olufsen) are active.
*
*  This file is part of Arduino-IRremote https://github.com/Arduino-IRremote/Arduino-IRremote.
*
************************************************************************************
* MIT License
*
* Copyright (c) 2020-2025 Armin Joachimsmeyer
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
************************************************************************************
*/

#include <Arduino.h>
#include <IRremote.hpp> // include the library

uint8_t sender_pins[] = {47, 48};
uint8_t receiver_pin = 13;

int sender_pin_num = sizeof(sender_pins) / sizeof(sender_pins[0]);
uint8_t sender_pin_idx = 0;
uint8_t receive_cnt = 0;
uint8_t sCommand = 0x34;
uint8_t sRepeats = 0;

void setup() {
    Serial.begin(115200);
    IrReceiver.begin(receiver_pin, false);
    IrSender.begin(sender_pins[0]);

    xTaskCreate(
      sendIr,    // Function that should be called
      "Send IR",   // Name of the task (for debugging)
      4096,            // Stack size (bytes)
      NULL,            // Parameter to pass
      1,               // Task priority
      NULL             // Task handle
  );
}

void sendIr(void * parameter) {
 
  delay(2000);
  IrSender.setSendPin(47);
  IrSender.sendNEC(0x00, sCommand, sRepeats);
  Serial.printf("send by pin: %d\n", 47);
  delay(2000);

  IrSender.setSendPin(48);
  IrSender.sendNEC(0x00, sCommand, sRepeats);
  Serial.printf("send by pin: %d\n", 48);

  delay(2000);
  vTaskDelete(NULL);
}

void loop() {
  if (IrReceiver.decode()) {
      Serial.println("recv data");
      if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
          Serial.println(F("Received noise or an unknown (or not yet enabled) protocol"));
          // We have an unknown protocol here, print extended info
          IrReceiver.printIRResultRawFormatted(&Serial, true);

          IrReceiver.resume(); // Do it here, to preserve raw data for printing with printIRResultRawFormatted()
      } else {
          IrReceiver.resume(); // Early enable receiving of the next IR frame

          IrReceiver.printIRResultShort(&Serial);
          IrReceiver.printIRSendUsage(&Serial);
      }
  } else {
    // Serial.println("no data");
  }
}
arduino ino file download:

.zip   11-IR-receiver.zip (Size: 1.61 KB / Downloads: 36)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   11-IR-receiver.ino.merged.zip (Size: 194.06 KB / Downloads: 39)

Print this item

  [arduino code examples for MT4v2]-10 Print TEXT on SSD1306 OLED displayer
Posted by: admin - 10-20-2026, 03:33 AM - Forum: MT4v2 - No Replies

Code:
/*
* Made by KinCony IoT: https://www.kincony.com
*
* This Arduino program demonstrates how to display text on an SSD1306 128x64 OLED display using the U8g2 library.
* The program draws two lines of text on the display:
* - The first line is "KINCONY" in a larger font.
* - The second line is "www.kincony.com" in a smaller font.
*
* The display is connected via I2C (software implementation) with:
* - SCL (clock) on pin IO18
* - SDA (data) on pin IO8
*
* The display's I2C address is set to 0x3C.
*/

#include <U8g2lib.h>  // Include the U8g2 library for controlling the OLED display
#include <Wire.h>     // Include the Wire library for I2C communication

// Initialize the display using the software I2C method (SCL = IO18, SDA = IO8)
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0,  18, 8, U8X8_PIN_NONE);  // Screen rotation: U8G2_R0

// Function to display page 1 content
void page1() {
  // Set font size 18 for the larger "KINCONY" text
  u8g2.setFont(u8g2_font_timR18_tf);  // Use the Times Roman font, size 18
  u8g2.setFontPosTop();               // Set the text position at the top of the display
  u8g2.setCursor(5, 0);               // Position the cursor at coordinates (5, 0)
  u8g2.print("KINCONY");              // Display the text "KINCONY" on the screen

  // Set font size 12 for the smaller "www.kincony.com" text
  u8g2.setFont(u8g2_font_timR12_tf);  // Use the Times Roman font, size 12
  u8g2.setCursor(0, 40);              // Position the cursor at coordinates (0, 40)
  u8g2.print("www.kincony.com");      // Display the text "www.kincony.com"
}

// Setup function, runs once when the program starts
void setup() {
  // Set the I2C address for the display to 0x3C
  u8g2.setI2CAddress(0x3C*2);  // I2C address shift for 8-bit format
 
  // Initialize the display
  u8g2.begin();
 
  // Enable UTF-8 character printing for the display
  u8g2.enableUTF8Print();  // Allow UTF-8 encoded text to be printed
}

// Main loop function, continuously runs after setup()
void loop() {
  // Begin the display drawing process
  u8g2.firstPage();  // Prepare the first page for drawing
  do {
    // Call the page1() function to draw content on the display
    page1();
  } while (u8g2.nextPage());  // Continue to the next page until all pages are drawn
}
arduino ino file download:

.zip   10-oled-ssd1306.zip (Size: 1.11 KB / Downloads: 41)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download: 

.zip   10-oled-ssd1306.ino.merged.zip (Size: 202.58 KB / Downloads: 39)

Print this item