7 years, 2 months ago.  This question has been closed. Reason: Off Topic

Keypad and LCD

Hi, I am trying to take an 4 digit input code from a keypad and then display this code on the LCD display, but i cant seem to quite get it to work, as any time I press a button, it only shows the button that was pressed and vanishes after a few seconds. How can i correct this thanks. My code is displayed below:

for(a = 0; a < 4; a++) { if(b!=' ') { b = getKey(); lcd.locate(6,1); lcd.putc(b);

} }