Hey folks, new here. been doing some youtube learning, and made this neat little sketch (to me anyways).
so my issue is, when I push the reset button, it will reset my counter on the LCD, but if I have any number above 9 on the counter, it will only reset the first digit, I have to push reset again for each number placement. how can I get it to just show 0 with one push?
Thanks for any help in advance.
Please disregard as I had the count reset in the wrong location.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
To expand on Gabriel's comment.
You have told the LCD what to print (a number in this case).
The LCD will continue to show that until you tell it print something else.
If you print a value like 10 on the display at position 0,0 then there is a 1 at 0,0 and a 0 at 1,0
If after printing that number, reduce the value you print to 0, and print it at position 0,0 then the 0 will be at 0,0 and another 0 will be at 1,0 since you never told the LCD to print anything else at the 1,0 position.
The Print class that comes with the Arduino IDE does not support fixed width printing.
So if you use the print() function to print numbers there is no way to tell it the field size.
If you want a fixed width field, you must handle it yourself.
i.e. print leading zeros/spaces if you want right adjusted, or space padding if you want left adjustment.
Alternatives:
If you have a teensy product, its Print includes a printf() method that you can use to get fixed width output.