PaulS:
Not me. I've tried, from the beginning, to get you to build functions that handle the various task. You seem welded to the idea that everything needs to happen in loop(), and unwilling to concede that that is NOT the case.It is far simpler to debug 20 to 25 lines of code that deal with getting input and displaying it on the LCD in a known position (hint: you know where to store the data in the array, so use that index value to "guess" where to display the character on the LCD) than it is to wade through hundreds of lines of code in loop().
I'm not welded to making everything work through the loop. I'm just trying to get the basic stuff going. Building functions outside the loop is probably the next step. For what should I build functions outside the loop so that debugging becomes easier?
UKHeliBob:
It would be more instructive and you would learn more if you made the changes yourself with help as to what you need to do, but you do not seem to listen.lcd.clear(); //do not clear the entire LCD. Position the cursor and print 5 spaces over the number
char displayText[18] = ""; //totally unnecessary
snprintf(displayText, sizeof(displayText), "Set Count:%5d", key - '0'); //and this
lcd.setCursor(0, 0); //position the cursor where you want to print the full number
lcd.print(displayText); //print the digits string not the 18 character mostly empty string
I've removed the lcd.clear() part from my code, I've not posted it yet because I'm not able to print the keys where I want.