multiple push button counter

Hello everyone
I'm just starting to learn Arduino.
I'd like to do a button press counter:
Button number 1 value: 0.1 points
Button number 2 value: 0.2 points
Button number 3 value: 0.5 points
Button number 4 value: 1 points
Button number 5 value: 2 points
Button number 6 value: 5 points
I would like arduino to count button presses to reach the intended value e.g. 10 points (or more)
After reaching I would like the led to light up

I found tutorials but they all work on the principle of one button.
Can You help me?

What is your back ground in electronics and programming ?

Show us what you have done so far.


Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components.
Posting images:

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

marmar666:
I'd like to do a button press counter
...
I found tutorials but they all work on the principle of one button.

There are a number of ways to approach this.

Probably the easiest, no (edit, or very little) learning required, but most tedious, and very inelegant, is just to duplicate what you've seen in those tutorials which probably include the state change detect one. Did you try that as a starting point?

Or, you could do some learning and put the button stuff in arrays, as a sort of intermediate (but still nice) solution. Then you could learn some more and put the button stuff in a struct and put those in an array for an even nicer one.

All depends how much effort you want to put into learning.

You should be able to do it the first way more or less right away. Just your code will be looooong :wink:

Further to that, the amount you want to learn depends on your purpose I suppose. Do you want a solution to an immediate problem (get someone to do it for you) or do you want to become self-sufficient? You said this 3 years ago:

marmar666:
I am a beginner with arduino.

... and now:

marmar666:
I'm just starting to learn Arduino.

So it's not clear if you want a solution or suggestions :wink: