Hi Guys
I have created a small program with the above LCD Display.
As can be seen there is two readings 001 and 0.
If the number value goes above 100 the digits don't align on the decreasing value.
ie the number 1 stays in the hundred's column.
any ideas how I can change this without clearing the screen completely
Best Regards
Ian
gLCD ST7565R1
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: gLCD ST7565R1
Hi Ian,
Before printing your number you need to make a decision if the number is less than 10 and less than 100. If it is then print out some padding 0's.
Here is some pseudo code.
if (number < 100)
PrintString ("0")
if (number < 10)
PrintString ("0")
PrintNumber (number)
Hope this helps.
Before printing your number you need to make a decision if the number is less than 10 and less than 100. If it is then print out some padding 0's.
Here is some pseudo code.
if (number < 100)
PrintString ("0")
if (number < 10)
PrintString ("0")
PrintNumber (number)
Hope this helps.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel