Why isn't my "Hello World" displaying on the LCD screen despite correct connections and power?
Hey Devs , I've been trying to make this simple LCD screen circuit that displays "Hello World".
I have made my connections like this
And my code is very simple
int rs = 7, en = 8, d4 = 9, d5 = 10, d6 = 11, d7 = 12, readPin = A2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// put your setup code here, to run once:
lcd.begin(16, 2);
//16 columns, 2 rows
pinMode(readPin,INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(0, 1);
lcd.print("Hello World");
lcd.print(millis()/1000);
Serial.println(analogRead(readPin));
}
I have triple-checked the connections and have even dismantled and reconnected everything twice, but nothing seems to help.
My soldering of the headpins on the LCD also seems fine.
I have already tried the following:
Disconnecting all data pins connecting only the power pins to get a row of black boxes on the top.
Adjusting the potentiometer.
Connecting both ends of the potentiometer to GND, as suggested by someone on some other forum thread.
Checking if my potentiometer is defective. I disconnected everything and performed an analogRead on the potentiometer(as shown in the code), and the potentiometer correctly varies from 0 to 1023 on turning its wheel.
None of these have helped. Since the lights are turning on, I don't think there's a problem with the LCD either. Can anyone please help me out?19 Replies
Hey Aymen, try to adjust the blue square in the back of the lcd , it is adjustable resistor that can be used to fine-tune settings and calibration
I'm not sure that I have that cercuit mounted, what is that
a potentiometer
for the clarity
of the pixels
try it you'll see
you have it mounted on the breadboard
its the same
Yeah the potentiometer I know it, I'm talking about the hole black cercuit, I've tried to change mine but it doesn't seem to work
It's an i2c board
It helps minimise cables
To test if the boards work correctly or not use the I2C scanner example code
And if you see an exadecimal
Code
It's works
I'id not try inverting the pins SDA and scl
And still if you don't see an address change the board
Finally if you see an address but when you try using the LCD screen with another code
Solution
It may be due to the screen itself being broken