How to artificially insert a decimal point on a display
April 10, 2011
I remember seeing this somewhere, but for the life of me, I can't seem to find it again.
I have some values, in my case, battery voltage and the amp draw from my motors. To keep the resolution, but loose the float, things get multiplied by 10. For example, my voltage within the program would be considered 117. When I display this value on my screen, I want to see 11.7 volts. I need to artificially add that decimal point --only so I, a human, can read it more easily.
Now, I think there is something about dividing by 100, then 10 or something. I started thinking this way but quickly ran into the issue of how the result will be "rounded". I guess there might be a solution in dealing with the number as a string and counting the chars, but I dunno.
These has had to come up before, can I get a nudge in the right direction?