I am currently doing a project for work and I'd like to know if it is possible to work a singular counter with multiple microswitches. The project is an interactive kit and we have designed a game which is similar to ski ball. I am wanting to know on how I'd go about on wiring up a digital counter which is able to take an input from different microswitches to display an increase of value as a score for the player. The idea for the scoring will be that as a microswitch is switched on it will +1 the counter, and some switches will increase it by +5 (Working off of multiple switches at once). If possible, is anyone able to help us with the type of components that can be used for this idea.
jamesbowers:
I am currently doing a project for work and I'd like to know if it is possible to work a singular counter with multiple microswitches. The project is an interactive kit and we have designed a game which is similar to ski ball. I am wanting to know on how I'd go about on wiring up a digital counter which is able to take an input from different microswitches to display an increase of value as a score for the player. The idea for the scoring will be that as a microswitch is switched on it will +1 the counter, and some switches will increase it by +5 (Working off of multiple switches at once). If possible, is anyone able to help us with the type of components that can be used for this idea.
Thank you!
You are confusing wiring with writing a program. You do not "wire up a digital counter".
The all the microswitches will need to have the common terminal connected to the Arduino ground. Then the "NO", normally open, connected to one of the Arduino pins you have selected. Your program will have to assign each of those pins as "input pullup".
You will have to debounce the microswitches as they use a springy metal leaf to make contact.
Your really critical programming will be to determine when each switch "BECOMES" pressed, not just incrementing the counter while the switch is pressed.
The ocean of microswitches is deep and wide. They're available with an array of arms, or not, solder terminals vs. screw terminals, etc. A lot depends on how you're going to handle the ball, its weight and so on.