Hi
I have been testing code to run on an LCD (AXE033; 16 x2)
I have several "user values" that can increment (0-999) when a button is pressed and the program asks for each of the 4 values which are stored in variables (words). I would like to display all these values on the LCD screen and know what each one refers to. Currently, on the upper line I put all the "Titles" for the values that should appear beneath them on the second line. It is easy to centre these with appropriate blank spaces (" "). I would like to align the text for the values on the second line and centre each under its corresponding title. The problem is that if a value has less than 3 digits it is not set in the right position under its "Title" and can cause all the other values to be offset as well.
The question is: how do I code to add spaces to my text based on whether I have a 2digit number (need one space; " ") or 1 digit (2spaces; " ").
Thank goodness for the simulator!! I wouldn't have got this far without it.
Thanks for any help.
I have been testing code to run on an LCD (AXE033; 16 x2)
I have several "user values" that can increment (0-999) when a button is pressed and the program asks for each of the 4 values which are stored in variables (words). I would like to display all these values on the LCD screen and know what each one refers to. Currently, on the upper line I put all the "Titles" for the values that should appear beneath them on the second line. It is easy to centre these with appropriate blank spaces (" "). I would like to align the text for the values on the second line and centre each under its corresponding title. The problem is that if a value has less than 3 digits it is not set in the right position under its "Title" and can cause all the other values to be offset as well.
The question is: how do I code to add spaces to my text based on whether I have a 2digit number (need one space; " ") or 1 digit (2spaces; " ").
Thank goodness for the simulator!! I wouldn't have got this far without it.
Thanks for any help.