Hi
For my university project i am making a wireless winch controller to operate a winch remotely, and have also developed it to give a display of the Battery voltage and number of turns of rope on the winch drum on a LCD display.
For the battery voltage i have taken the analog value from a potentiomenter and multiplied it by 0.01566 to give the range from 0v to 16v.
lcd.setCursor(10, 0); //moves cursor to end of equals sign
lcd.print(analogValue*0.01566);//prints the battery voltage 0-16v
For the number of turns of rope on the drum (Turncount) i have printed the number to the lcd display,
lcd.setCursor(30,1); //moves cursor to end of equals sign
lcd.print(RTurncount); //prints the number or rear turns
The problem that i have got is when the battery voltage drops from double figures to single figures (10.28v to 9.81v) it keeps the last digit in place so actually prints 9.818v. I have got the same problem with displaying the number of turns of rope on the drum, anything above 10 good but when it drops to 9, 8 7 etc it actually displays "90", "80","70" etc.
How can i get around this problem? i think i am right in saying that it is caused by the digits being shifted to the left and not erasing the previous information that left there.
Many thanks
Tris