Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delay Relay F8
#1
Pin Definitions:
Subject: Request: Sequential 8-relay example for F8 (ESP32-S3), 1.5s step, reverse on shutdown


Message:
Hello KinCony team,

I am using the KinCony F8 (ESP32-S3) board with the PCF8575 I/O expander to control 8 relays. I would like to have an Arduino example that performs the following:
  •  Sequential ON: Relay1 → Relay8, with 1.5 seconds delay between each relay.
  •  Sequential OFF: Relay8 → Relay1, with the same 1.5 seconds delay.
  •  Arduino IDE, using I2C with SDA = GPIO8, SCL = GPIO18, and PCF8575 address = 0x24 (please confirm).

My questions are:
1. What is the exact GPIO mapping for each relay on the F8 hardware revision?
2. Do you have an official Arduino example implementing this sequence?
3. If there is a recommended library or header file for this board, could you please share the link?

Here is a sample code I tested so far (for reference):
// I2C pins
#define SDA 8
#define SCL 18
#include <Wire.h>
#include <PCF8575.h>

#define I2C_SDA 8
#define I2C_SCL 18
#define PCF8575_ADDR 0x24

PCF8575 pcf(PCF8575_ADDR);
const uint8_t RELAY_PINS[8] = {P0, P1, P2, P3, P4, P5, P6, P7};

void setup() {
  Serial.begin(115200);
  if (!pcf.begin(I2C_SDA, I2C_SCL)) {
    Serial.println("PCF8575 not found!");
    while (1);
  }
  for (int i = 0; i < 8; i++) {
    pcf.write(RELAY_PINS[i], HIGH);  // OFF at start
  }
}

void loop() {
  // Sequential ON
  for (int i = 0; i < 8; i++) {
    Serial.print("Relay ON: "); Serial.println(i+1);
    pcf.write(RELAY_PINS[i], LOW);
    delay(1500);
  }

  // Sequential OFF
  for (int i = 7; i >= 0; i--) {
    Serial.print("Relay OFF: "); Serial.println(i+1);
    pcf.write(RELAY_PINS[i], HIGH);
    delay(1500);
  }
}
Reply


Messages In This Thread
Delay Relay F8 - by abbasgts - 09-24-2025, 06:13 AM
RE: Delay Relay F8 - by admin - 09-24-2025, 10:50 AM
RE: Delay Relay F8 - by abbasgts - 09-24-2025, 01:53 PM
RE: Delay Relay F8 - by admin - 09-24-2025, 11:52 PM
RE: Delay Relay F8 - by abbasgts - 09-25-2025, 06:57 AM
RE: Delay Relay F8 - by admin - 09-25-2025, 08:27 AM
RE: Delay Relay F8 - by abbasgts - 09-25-2025, 09:29 AM
RE: Delay Relay F8 - by admin - 09-25-2025, 11:42 PM
RE: Delay Relay F8 - by admin - 09-26-2025, 07:25 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)