M Mostez Well-Known Member Licensed User Longtime User Jul 15, 2022 #1 I tried to run this PCF8574 example on ESP32S board but failed to compile the code, is it possible to use this library with ESP32? if yes, kindly provide simple example code. I tried different initialization, B4X: pcf.Initialize(0x20,pcf.I2C_Wire2) 'also tried Wire and Wire1 pcf.begin(21,22,0xFF) 'ESP I2C pins TIA
I tried to run this PCF8574 example on ESP32S board but failed to compile the code, is it possible to use this library with ESP32? if yes, kindly provide simple example code. I tried different initialization, B4X: pcf.Initialize(0x20,pcf.I2C_Wire2) 'also tried Wire and Wire1 pcf.begin(21,22,0xFF) 'ESP I2C pins TIA
C candide Active Member Licensed User Longtime User Jul 15, 2022 #2 normally on esp32 wire0 is the first and wire1 is the second. for first wire on esp32: pfc.Initialize(0x20,pcf.I2C_Wire0); pfc.begin1(0xFF) and SDA by default is GPIO 21 / SCL by default is GPIO 22 Upvote 0
normally on esp32 wire0 is the first and wire1 is the second. for first wire on esp32: pfc.Initialize(0x20,pcf.I2C_Wire0); pfc.begin1(0xFF) and SDA by default is GPIO 21 / SCL by default is GPIO 22
M Mostez Well-Known Member Licensed User Longtime User Jul 16, 2022 #3 I2C_Wire0 is not exist, however I tried (begin1) method with no hope, I changed to Arduino Nano but it failed too! Upvote 0
I2C_Wire0 is not exist, however I tried (begin1) method with no hope, I changed to Arduino Nano but it failed too!
C candide Active Member Licensed User Longtime User Jul 16, 2022 #4 just tested with esp8266 and compilation is OK i will check soon with esp32 B4R 3.90 Arduino 1.8.15 Upvote 0
C candide Active Member Licensed User Longtime User Jul 16, 2022 #5 test with esp32: compilation is NOK i have to check this issue in wrapper Upvote 0
C candide Active Member Licensed User Longtime User Jul 17, 2022 #7 in fact, management of I2C was not correct for esp32 can you check this version ? i hope it is better. Attachments rPCF8574_lib.zip rPCF8574_lib.zip 5.5 KB · Views: 566 rPCF8574_B4R.zip rPCF8574_B4R.zip 1.9 KB · Views: 539 Upvote 0
in fact, management of I2C was not correct for esp32 can you check this version ? i hope it is better.
M Mostez Well-Known Member Licensed User Longtime User Jul 17, 2022 #8 compiled OK, and the led blinked OK too. did not test the keys relevant code yet. Thank you for your great efforts. Upvote 0
compiled OK, and the led blinked OK too. did not test the keys relevant code yet. Thank you for your great efforts.