LCD-Display Life Point Counter

Hello, I'm trying to create a Yu-Gi-Oh! Lifepoint Counter using an LCD-Display, essentially what I need is to know how to create a 4 digit counter where each digit can be individually incremented via a button-press.

I can't find any similar projects online to use for guidance and I am rubbish when it comes to LCD-Displays, so any bit of help is appreciated, thank you!

Welcome.

Please read the forum guidelines to get some ideas on how to get the best of the forum.

What Arduino board? Which LCD display?

What have you tried? We are glad to help you get your code to work, but we can't write it for you. Post your best effort at writing the code. Tell us what the code actually does and how that differs from what you want. Read the section of the forum guidelines that tells how to properly post code. Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

How many buttons?
Long presses?

One button for thousands, one for hundreds, one for tens and one for the units. What is so difficult about that?

the problem is I can't figure out how to increment each digit separately, I've run simulations and they always increment the ENTIRE number.

Maybe if we could see the code we could help fix it. Otherwise I guess that you are on your own.

digit1++; //increment digit
if (digit1>9) digit1=0; //rollover
...
number = digit1 + 10*digit2 + 100*digit3 + 1000*digit4;

you are a saint, thank you

You ONLY have individual counters. They show on the display as a composite four digit number. Print them individually on the display. Just ensure the value in each one never get beyond 9.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.