White Squares on a 1602A lcd screen

Issue with 1602A lcd screen arduino mega 2560

I am struggling here, I have an elegoo mega 2560 and a 1602A screen

i followed a diagram on the forum to wire it up because i am relatively new to arduino.

Im not sure what else to write here other than the code is here and a labeled image, i would attach an image of the arduino but im a new user.

#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 11, 12);

void setup() {
lcd.begin(2, 16);
}

void loop() {
lcd.print("Hello");
{

Thanks for any help!

do you have a way to adjust the contrast of the screen (often there is a potentiometer)? it might be to high thus you only see the white squares

lcd.begin(2, 16);

Shouldn't that be (16,2)?

LiquidCrystal lcd(2, 3, 4, 5, 11, 12);
And this should be (12, 11, 5, 4, 3, 2) according to the wiring in the photo (best that I can tell).

Almost all of the LCD tutorials have the wiring of the contrast pot wrong. It is a mistake that has been perpetuated through the years. The right way is to wire the one end of the pot to ground and the wiper to LCD pin 3 (V0). The other end of the pot is left disconnected. So the pot is a variable resistor. Actually I find that a 1K fixed resistor from ground to Vo gives me satisfactory contrast on virtually every LCD that I have tried.

lcd pot

void loop() {
lcd.print("Hello");
{  // this is an opening bracket, needs a closing bracket }

That loop will just spam the display. Move the lcd.print to setup so that it just prints once.

@squeakycheese72, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project :wink: See About the Installation & Troubleshooting category.

Please edit your post, select all code and click the </> button to apply code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.

Taking photos in the dark is not really helpful either.

Hi! Thanks for taking the time to respond but I think I'm just gonna stop with the screen because I am very new to Arduino and have only learnt how to wire up a light and sevo, I should probably learn Arduino before attempting these things.

Have a great day and sorry for the late response