LiquidCrystal not working with Dfrobot LCD shield

Hi all,
I am new in the Arduino world. I bought an Arduino and a LCD shield. But it is not working properly… In the moment that I call LiquidCrystal lcd(8, 9, 4, 5, 6, 7); nothing works anymore…

When I use this code, I see nothing on the LCD and the Arduino led doesn’t blink

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

int led = 13;

void setup() {
  pinMode(led, OUTPUT);

  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  digitalWrite(led, HIGH);
  delay(500);
  
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
  
  digitalWrite(led, LOW);
  delay(500);
}

If I comment out the lcd initialisation with all the lcd function calls then I see the led blinking.
I checked that the pins passed to the function are the right ones and they are working properly.
I also manage to make it work once, but I have no clue how to make this deterministic.

Does someone have a clue why this is happening?

Thanks

Load a nonLCD sketch such as blinky to get rid of any LCD code in the Arduino.

Connect the LCD shield to the Arduino and apply power. You should be able to adjust the potentiometer to get blocks on the top row of the display. That looks like a 10-turn potentiometer so make sure you are turning it in the correct direction and turning it far enough. You need to adjust it to get somewhere around 0.5v at pin 3 of the LCD.

Don’t bother to proceed if you don’t see the blocks - you have to get that part working first.

If that is OK then load an LCD sketch that has everything between the brackets the LCD related code in loop() commented out so you can test the display in a static state. Let us know how you made out.

Don

Also be sure to read the sticky post → “Warning to users of some vendors LCD keypad shields.” ← at the top of this forum section

unfortunately no improvements…

It looks like that the initialisation of the LiquidCrystal library makes Arduino crash.

Photo on 23-10-16 at 17.10.jpg

Have you tried reinstalling the library?

Are you sure you haven't loaded any conflicting liquid crystal libraries at one point or another?

Don

pirtata000: unfortunately no improvements...

It looks like that the initialisation of the LiquidCrystal library makes Arduino crash.

What does this really mean? If you removed all the LiquidCrystal library stuff from your sketch, how could it be be affecting the operation of blinking the LED?

Are you looking at the correct LED? (The one on the Arduino board - not the one on the shield) That keypad shield looks like it has a power LED - which will not blink.

--- bill