i using esp32 cam, but when i upload and run this code, have no words in LCD. no error, but does not display any text. maybe all of you have a code or library to connect ESP32 CAM with LCD I2C?
It is probably not allowed to define "SDA" and "SCL". They might already be defined somewhere.
Which board have you installed ? The normal ESP32 Espressif boards ?
It does not have a USB connector ? How can you send messages to the Serial Monitor ?
There seems to be problem to connect I2C devices to the ESP32-CAM. Some say to use a software I2C bus.
The ESP32-CAM is a 3.3V chip and your display is probably a 5V display. That does not match very well.
The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
I'n not sure what you're building here but your code defines SDA & SCL. You should remove these lines as they are already defined by the Arduino. I'm using a Nano and the pins are as follows;
SDA = A4
SCL = A5
They cannot be changed so that could be part of your problem. You can also stack multiple I2C devices on these pins but you will need to find the address of each device and make them unique. Here's some code you can run to find the addresses. Make sure you have the <Wire.h> library installed. Hope this helps. Have a great day.
#include <Wire.h>
void setup() {
Serial.begin (115200);
// 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 (100); // 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() {}