LCD NOT PRINTING

Hi.I have a lcd 20*4 .before a week was working normaly,but now it doesn't printing.Because of my code ,I understand and I see that it is flashing ,but not prints anything....
The circuit:

αρχείο λήψης.png

A loose connection on the breadboard? A flashing LCD backlight is a sure symptom of that.

No,nothing happens...Ichanged breadboard,ther circuit is correct ,but nothing...

Please ,I need HELP!!!!!

Any advice,any help....I can not understand why lcd doesn't print anything.

If you haven't changed the connection and are sure all is good and you think the code is to blame, you should post the code. is this the circuit ?αρχείο λήψης.pngHave you fiddled with the contrast pot ?

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int lcd_position_array[3] = {3, 10, 16};
const int buttons[3] = {6, 7, 8};
const int button_for_play_game = 9;
boolean false_var_lcd_game = true;
unsigned long previousMillis_2 = 0;
unsigned long previousMillis = 0;
unsigned long previousMillis_end_game = 0;
boolean second_false_var_lcd_game = true;
boolean false_var_lcd_game_2 = true;
boolean second_false_var_lcd_game_2 = true;
boolean check_onions = true;




byte smile[8] =
{
  0b00000,
  0b00000,
  0b01010,
  0b00000,
  0b00000,
  0b10001,
  0b01110,
  0b00000
};

byte sad[8]
{
  0b00000,
  0b00000,
  0b01010,
  0b00000,
  0b00000,
  0b01110,
  0b10001,
  0b00000
};

byte onion[9]
{
  0b00000,
  0b00100,
  0b00100,
  0b01110,
  0b11111,
  0b11111,
  0b01110,
  0b00100
};


void setup()
{
  lcd.begin(20, 4);
  for (int i = 0; i < 3; i++)
  {
    pinMode(buttons[i], INPUT);
  }
  randomSeed(analogRead(A0));
  lcd.createChar(1, sad);
  lcd.createChar(0, smile);
  lcd.createChar(2, onion);
  pinMode(button_for_play_game, INPUT);
}



void lcd_game_message_on_off()
{
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis >= 750 && second_false_var_lcd_game)
  {
    previousMillis = currentMillis;

    if (false_var_lcd_game)
    {
      lcd.setCursor(2, 0);
      lcd.print("PRESS ANY BUTTON");
      lcd.setCursor(2, 1);
      lcd.print("TO PLAY THE GAME");
    }
    else
    {
      lcd.setCursor(0, 0);
      lcd.print("                    ");
      lcd.setCursor(0, 1);
      lcd.print("                    ");
    }
    false_var_lcd_game = !false_var_lcd_game;
  }
}


void lcd_game_message_on_off_for_onion()
{
  unsigned long currentMillis_2 = millis();
  if (currentMillis_2 - previousMillis_2 >= 750 && second_false_var_lcd_game_2)
  {
    previousMillis_2 = currentMillis_2;

    if (false_var_lcd_game_2)
    {
      lcd.setCursor(3, 0);
      lcd.print("FIND THE ONION");
    }
    else
    {
      lcd.setCursor(3, 0);
      lcd.print("                  ");
    }
    false_var_lcd_game_2 = !false_var_lcd_game_2;
  }
}



void onions()
{
  if (check_onions)
  {
    lcd.setCursor(0, 3);
    lcd.write(byte(2));
    lcd.setCursor(2, 3);
    lcd.write(byte(2));
    lcd.setCursor(4, 3);
    lcd.write(byte(2));
    lcd.setCursor(6, 3);
    lcd.write(byte(2));
    lcd.setCursor(8, 3);
    lcd.write(byte(2));
    lcd.setCursor(10, 3);
    lcd.write(byte(2));
    lcd.setCursor(12, 3);
    lcd.write(byte(2));
    lcd.setCursor(14, 3);
    lcd.write(byte(2));
    lcd.setCursor(16, 3);
    lcd.write(byte(2));
    lcd.setCursor(18, 3);
    lcd.write(byte(2));
    lcd.setCursor(1, 2);
    lcd.write(byte(2));
    lcd.setCursor(3, 2);
    lcd.write(byte(2));
    lcd.setCursor(5, 2);
    lcd.write(byte(2));
    lcd.setCursor(7, 2);
    lcd.write(byte(2));
    lcd.setCursor(9, 2);
    lcd.write(byte(2));
    lcd.setCursor(11, 2);
    lcd.write(byte(2));
    lcd.setCursor(13, 2);
    lcd.write(byte(2));
    lcd.setCursor(15, 2);
    lcd.write(byte(2));
    lcd.setCursor(17, 2);
    lcd.write(byte(2));
  }
  else
  {
    lcd.setCursor(0, 2);
    lcd.print("                    ");
    lcd.setCursor(0, 3);
    lcd.print("                    ");
  }
}


void lcd_game()
{
  int chosen_position;
  int pos;
  boolean buttonIsPressed = false;
  unsigned long current_Millis_end_game = millis();

  do
  {
    onions();
    lcd_game_message_on_off();

    for (int i = 0; i < 3; i++)
    {
      if (digitalRead(buttons[i]) == HIGH)
      {
        buttonIsPressed = true;
      }
    }
  }
  while (!buttonIsPressed);
  buttonIsPressed = false;
  lcd.clear();
  delay(1);
  check_onions = false;
  lcd.setCursor(2, 2);
  lcd.print("(");
  lcd.setCursor(4, 2);
  lcd.print(")");
  lcd.setCursor(9, 2);
  lcd.print("(");
  lcd.setCursor(11, 2);
  lcd.print(")");
  lcd.setCursor(15, 2);
  lcd.print("(");
  lcd.setCursor(17, 2);
  lcd.print(")");

  for (int j = 0; j < 180; j++)
  {
    pos = random(0, 3);
    lcd.setCursor(lcd_position_array[pos], 2);
    lcd.write(byte(2));
    delay(15);
    lcd.setCursor(lcd_position_array[pos], 2);
    lcd.print(" ");
    delay(15);
  }

  do
  {
    lcd_game_message_on_off_for_onion();
    if (digitalRead(buttons[0]) == HIGH)
    {
      buttonIsPressed = true;
      chosen_position = 0;
    }
    else if (digitalRead(buttons[1]) == HIGH)
    {
      buttonIsPressed = true;
      chosen_position = 1;
    }
    else if (digitalRead(buttons[2]) == HIGH)
    {
      buttonIsPressed = true;
      chosen_position = 2;
    }
  }
  while (!buttonIsPressed);
  buttonIsPressed = false;
  delay(5);
  lcd.setCursor(0, 0);
  lcd.print("                   ");
  lcd.setCursor(2, 2);
  lcd.print("(");
  lcd.setCursor(4, 2);
  lcd.print(")");
  lcd.setCursor(9, 2);
  lcd.print("(");
  lcd.setCursor(11, 2);
  lcd.print(")");
  lcd.setCursor(15, 2);
  lcd.print("(");
  lcd.setCursor(17, 2);
  lcd.print(")");
  lcd.setCursor(lcd_position_array[pos], 2);
  lcd.write(byte(2));

  if (pos == chosen_position)
  {
    lcd.setCursor(3, 0);
    lcd.write("YOU WON !!!");
    lcd.setCursor(17, 0);
    lcd.write(byte(0));
    end_game = true;
  }
  else
  {
    lcd.setCursor(3, 0);
    lcd.write("YOU LOST !!!");
    lcd.setCursor(17, 0);
    lcd.write(byte(1));
    end_game = true;
  }
  delay(1600);
  lcd.clear();
  second_false_var_lcd_game = false;
  delay(1);
  lcd.clear();
  delay(1);
  lcd.setCursor(5, 0);
  lcd.print("PLAY AGAIN ?");
  delay(1000);
  delay(1);
  lcd.clear();
}


void enable_lcd_game()
{
  lcd.setCursor(1, 0);
  lcd.print("PRESS RIGHT BUTTON");
  lcd.setCursor(1, 1);
  lcd.print("TO ENABLE THE GAME");
  if (digitalRead(button_for_play_game) == HIGH)
  {
    delay(1);
    lcd.clear();
    delay(1);
    second_false_var_lcd_game = true;
    check_onions = true;
    lcd_game();
  }
}


void loop()
{
  enable_lcd_game();
}

Before a week ,lcd was working nomally ...I tried it in arduino uno ,mega ,I tried it in a 16*2,but nothing...

Look for a very simple "Hello World" LCD sketch and try that before retying that game program.

nothing
i can not understand what is happening

Does the back light work ?

Now it is working...

(deleted)

Nothing :confused: