hd44780 text barely readable

Hi all,
I’ve just recently dived in the world of electronics (for fun), coming from a strictly programming background.
I have bought an arduino uno R3 and a 16x2 LCD HD44780 display in the form of an Arduino Shield (+ keypad).
LCD Keypad Shield
I’m using the LiquidCrystal library and I have set up the ports correctly (i think). The problem is that the text is barely readable. It’s very faint and viewable by a certain angle.
Here are pictures:

  1. From top
  2. From an angle (the text is not quite visible on the image, but it’s there, barely)

Here is the code used to generate the text:

#include <LiquidCrystal.h>

// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
  
 lcd.begin(16, 2);
 lcd.setCursor(0,0);
 lcd.print("Hello World");
}
 
void loop(){

}

My question is: Is this something I messed up programatically or just the board is defective in some kind? And if it’s the latter, is there a way to fix it or should I buy another one.

Thank you for your time.
Best,
Rosen

Pin 3 is contrast.
You have not mentioned anything about the contrast pot (potentiometer) that should be
a 10k to 50 k ohm pot with center terminal connected to pin 3 of the lcd and the other
two connectected to +5V and Ground respectively. The pin connected to ground should
be the one the wiper is at when the know is full counter clockwise position.
So why have you not mentioned this contrast pot ?
Is it because you don't have it installed (connected ) ?
Without it you would not be able to see any text.

I didn't know about Pin 3 because I bought the LCD keypad shield and it came without specs or diagrams of any kind and I didn't know how it was working.
I found out that the weird yellow thing on the edge is this contrast potentiometer of which you spoke. I feel a bit stupid now, because I was staring at the board for a good two hours...

Thank you for your help. Everything is working as it should!

Best,
Rosen

We all feel at bit stupid after doing something at one time or another .
I got careless connecting wires the other day and connected 24Vdc
to a 5V temperature sensor and it started smoking. OOPs !
Glad to hear that worked out ok for you
Can you please post a photo of your lcd shield with the potentiometer visible
and any other info you may have, make , model, website, etc.
See if there are any markings on it with numbers or letters.
It could be useful to us in the future. We can give people a link to
this post where they can view the photo and see the pot.
Or , we could just say "turn the little yellow thingy clockwise..."