xreef / PCF8574_library

PCF8574 library. i2c digital expander for Arduino, Raspberry Pi Pico and rp2040 boards, esp32, SMT32 and ESP8266. Can read write digital values with only 2 wire. Very simple to use and encoder support.
Other
214 stars 62 forks source link

Unable to call in ESP32 #69

Closed Murugesh-Hobbyist closed 4 months ago

Murugesh-Hobbyist commented 4 months ago

Hi, I'm using below code in esp32 but results as "Failed". Using I2C pins SDA -> 5 & SCL0 -> 6. Checked the address is 0x27 Please help to fix this.

`#include "Arduino.h"

include "PCF8574.h"

PCF8574 pcf8574(0x27);

void setup() { Serial.begin(115200); if (pcf8574.begin()) Serial.println("OK"); else Serial.println("Failed"); } void loop() {}`

xreef commented 4 months ago

Hi, try a i2c scanner and check your wiring. Bye Renzo