Set password LCD-Button

HI!
The LCD works well but when i push button for set the number it doesn't work. I don't get.
The LCD should show the number that i previously set when i push.

this is the breadboard and the code:

Thanks!

hi. please put your coding here so that it'll be easier for us to check the problem :slight_smile:

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int button_1 = 10;
int button_2 = 9;
int button_3 = 8;
int button_4 = 7;

char n1;
char n2;
char n3;
char n4;

int LED = 13;
int i = 0;

char pass[4];

void setup() {

lcd.begin(16, 2);

lcd.print(“Scegli Password:”);

pinMode(LED,OUTPUT);

pinMode(button_1,INPUT);
pinMode(button_2,INPUT);
pinMode(button_3,INPUT);
pinMode(button_4,INPUT);

lcd.setCursor(0,1);

for(i=0;i<5;i++)

{
if( digitalRead(button_1) == HIGH){
n1=‘0’;
lcd.print(n1);
pass*= n1;*

  • }*

  • if( digitalRead(button_2) == HIGH){*

  • n2=‘1’;*

  • lcd.print(n2);*
    _ pass*= n2;_
    _
    } _
    if( digitalRead(button_3) == HIGH){*

* n3=‘2’;*
* lcd.print(n3);*
_ pass*= n3;
}_
if( digitalRead(button_4) == HIGH){*

* n4=‘3’;*
* lcd.print(n4);*
_ pass*= n4;
}*_

}
* if(i==4)*
* {*

* lcd.clear();*
* lcd.print(“Sei sicuro?”);*

* if(digitalRead(button_1) == HIGH)
_ {
lcd.setCursor(0,1);
lcd.print(“Ok!”);
}*_

* }*

}
void loop() {

*} *