Printing a space bar using a keypad
Posted: Sun Mar 04, 2018 11:45 am
Hi All,
I am having difficulty with printing a space when the * button is pressed. I have seen other members ask this question and I have had a look at other peoples keypad programs. I have tried using 32, as the keypad number, which in theory should be printed as the ASCII equivalent which is a space.
My program uses a number which is multiplied by 10 and then added to the key pressed, so it can be displayed one after the other. I have got very close with this problem, as I have now managed to print a number one after the previous by pressing *, but it stays at 32 instead of going to the space icon.
E.g I want to input numbers like 0123 and then when * is pressed the next number will go after with a space so, if I pressed 6 after it would be 0123 6 on the LCD
I have attached my program, I think the problem may lie with the program afterwards which then converts my number variable into a string. If anyone knows how to print a space bar using *, then I would appreciate your help,
Kind Regards,
Jaco
I am having difficulty with printing a space when the * button is pressed. I have seen other members ask this question and I have had a look at other peoples keypad programs. I have tried using 32, as the keypad number, which in theory should be printed as the ASCII equivalent which is a space.
My program uses a number which is multiplied by 10 and then added to the key pressed, so it can be displayed one after the other. I have got very close with this problem, as I have now managed to print a number one after the previous by pressing *, but it stays at 32 instead of going to the space icon.
E.g I want to input numbers like 0123 and then when * is pressed the next number will go after with a space so, if I pressed 6 after it would be 0123 6 on the LCD
I have attached my program, I think the problem may lie with the program afterwards which then converts my number variable into a string. If anyone knows how to print a space bar using *, then I would appreciate your help,
Kind Regards,
Jaco