I have not had this issue in the past but for some reason I cannot connect an LCD with i2c adapter to any microcontroller.
Here are a few shots to show LCD's recently working:
The above is of my test board.
This image is of an enclosure in a well house.
Recent Computer Changes
I did upgrade my MBPro OSx to Sonoma 14.2. It was after this that I began having this problem but I cannot prove that this was the cause of my LCD issues. I suspect it has nothing to do with this but I can not be certain of this.
Sketch
I have used the following sketch to try and connect with the LCD:
// I2C Scanner
// Written by Nick Gammon
// Date: 20th April 2011
#include <Wire.h>
void setup() {
Serial.begin (9600);
// Leonardo: wait for serial port to connect
while (!Serial)
{
}
Serial.println ();
Serial.println ("I2C scanner. Scanning ...");
byte count = 0;
Wire.begin();
for (byte i = 8; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Found address: ");
Serial.print (i, DEC);
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
count++;
delay (1); // maybe unneeded?
} // end of good response
} // end of for loop
Serial.println ("Done.");
Serial.print ("Found ");
Serial.print (count, DEC);
Serial.println (" device(s).");
} // end of setup
void loop() {}
It takes this sketch a LONG TIME to produce the following result:
13:25:21.390 -> Done.
13:25:21.418 -> Found 0 device(s).
Arduino IDE
I have tried both versions of the IDE. Makes no difference which I use.
Boards Used
I have tried both a HUZZAH32 ESP32 and an ESP32-WROOM-32D board.
Board Connections
HUZZAH32: i2c adapter SDA to the SDA pin, i2c SCL to the SCL board pin
WROOM: i2c adapter SDA to GPIO21, i2c SCL to GPIO22
Level Shifter / Booster
The HUZZAH only has 3.3V logic so I have to use a booster to drive 3.3V up to 5.0V required by the LCD. The WROOM board has a 5V pin so no level shifter required.
Pull up Resistors
I have use 4K7 resistors on both SDA and SCL lines but that does not help. I have read that these are not necessary but using them or not makes no difference to the LCD.
I can provide all the images you may need but hopefully I have provided sufficient info for someone to point out my ignorance in this issue.
Thank you.





