Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Troubles using I2C/IIC bus
#11
you just need to install PCF8574 library.

.zip   PCF8574_library.zip (Size: 23.8 MB / Downloads: 244)
Reply
#12
Hi. There are of the my IDE code:
include <PCF8574.h>
#include <Wire.h>
#define SDA_PIN 4 // GPIO номер SDA
#define SCL_PIN 15 // GPIO номер SCL

void setup() {
Wire.begin(SDA_PIN, SCL_PIN); // Задали новые контакты для I²C
// Инициализируем I²C
Serial.begin(115200); // Инициализируем последовательный порт
while (!Serial); // Ждем открытия порта
Serial.println("\n\n--- I²C Scanner ---");
}

void loop() {
byte error, address;
int nDevicesFound = 0;

Serial.println("Scaning...");

for (address = 1; address < 127; address++ ) {
Wire.beginTransmission(address);
error = Wire.endTransmission();

if (error == 0) {
Serial.print("Device found at address: 0x");
if (address < 16) {
Serial.print("0");
}
Serial.println(address, HEX);
nDevicesFound++;
}
else if (error == 4) {
Serial.print("Unknown error at address: 0x");
if (address < 16) {
Serial.print("0");
}
Serial.println(address, HEX);
}
}

if (nDevicesFound == 0) {
Serial.println("No I²C devices found.\n");
} else {
Serial.println("Scan complete.\n");
}

delay(5000); // Повторяем проверку каждые 5 секунд
}

Where it any mistake?
Reply
#13
   
What does  the problem at  yours demo Relays code?
May be the KC-868-A6 Board  is defective?
Reply
#14
please download KCS v2 firmware to test your board firstly.
if KCS v2 firmware work well, that means hardware is well, you need to check your software system.
Reply
#15
(06-30-2025, 11:20 PM)admin Wrote: please download KCS v2 firmware to test your board firstly.
if KCS v2 firmware work well, that means hardware is well, you need to check your software system.

Dear Admin!
I have already installed the KSV firmware on my board several times.The version of the my  Firmware is  KC868_A6-v2.2.14.bin.
See  you the attachment.
   
After installation   this firmware I2C and relays does not wort on my Board too!
Reply
#16
after you downloaded KCS v2 firmware, login by web browser, click "monitor" webpage, turn on/off relay button ico, relay can't work , right?
Reply
#17
   
           
Dear,Admin!
This is incredible!!
The KC 868 Board worked. But in the Monitor Menu there is NO RELAY,  Please see screenshot
Reply
#18
take a photo of your PCB board.
Reply
#19
   
(07-02-2025, 10:44 AM)admin Wrote: take a photo of your PCB board.

There is of Photo my Board
Reply
#20
what power supply you are using? suggest use DC12V 2A. suggest you change a new power supply for a testing.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)