I am trying to get my ESP-32D to show my data on the screen for a 16x2 I2C bagpack but it is just shwoing blocks. any advice ?
I moved your topic to a more appropriate forum category @miguelito134462.
The Nano Family > Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.
In the future, when creating a topic 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.
Thanks in advance for your cooperation.
adjust the contrast
Assuming you have good parts, you can run the backpack at 5 V but pull up the I2C pins with about 3K resistors to 3.3 V, not 5 V.
The reason is that most of the displays I have used will not run well at 3.3 V, or if they do, they are marginal. Also, as @time_document_3108 suggests, adjust the contrast.
This works because the I2C pins are open collector (open drain). They do not drive the lines high. The pull-up resistors provide the high level.
Please show us the code you're using (including what LiquidCrystal_I2C library and version you're using) and a diagram (and/or a photo) of the connections.
Your problem could range from bad connections, to a bad I2C address, a wrong library, missing or badly connected pull-up resistors, or just a bad contrast setting. Hard to say without more information.
This would likely go much better if you showed your code? Things like what I2C address you are using?
Ron
Has power, but not initialized with the I2C library.
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init(); // I2C LCD initialization
}
void loop(){}