Correctly showing a value on a display
TC
Posts: 1,019
Hello all, I need a little help correctly showing a value on my LCD display. My variables are integer, but I need to show a decimal point. The decimal point never really moves, For example;
MyVar := 100000 On display = 100.000 MyVar := 10000 On display = 10.000 MyVar := 1000 On display 1.000 MyVar := 123456 On display = 123.456
Comments
It is for a 3d printer. the code I am working with takes the string value (N3 G1 X1.104 Y2.500 Z-.100) from the host software, converts it to intergers (N=3, G=1, X=1104, Y=2500, Z=-100). all the coordinance are 3 decimal places, and my display object works just like "Parallax Serial Terminal"
I used those examples from my first post just to give an idea of what I was talking about, they are not in my code.
That worked great, Thank you very much.