Whack a Mole - Arduino Game (full arduino tutorial with code)

preview_player
Показать описание
We love playing arcade games like Whack-a-mole and Strike a Light. So we decided to build one, using an Arduino Nano in this arduino project. This is our Arduino Game, arcade style. We call it Button Smack!

With just an arduino nano, a few buttons and a display you have all the basics stuff you need to get started for this arduino tutorial.

Strike the buttons as they light up. First player to reach 100 points wins the game. We made our code free to use, share, modify and play with as you like.

Parts (affiliate links):
***********************

Contribute to the Arduino Software
Consider supporting the Arduino Software by contributing to its development.

Wiring diagram:
******************

Code for the game:
**********************


Music:
********
Music - background music
Song: Punky
Composer: Benjamin Tissot (also known as Bensound)
Рекомендации по теме
Комментарии
Автор

I have now completed The building of this game and it works perfect! So I just wanted to say thank you. It was my first arduino experience and it made me learn alot 😊

Lakshoe
Автор

Thank you for linking to all the resources needed ! Now I'm off to get a box and all the other supplies!

jc
Автор

wonderful project ! buttons for players 1/2 aren't in the code nor the schema, right ? game is always launched with 2 players by default ?

mnsmat
Автор

I have a problem!
Everything is done but all lights light at same time
Checking the code (what I little understand) I've noticed a randomseed...A7, but my A7 pin (arduino nano) is not wired!!!!
What did I do wrong...or how to solve that?

I appreciate your

andresaguado
Автор

You guys are amazing! I'm currently building a very similar (but smaller) game using an arduino nano, and this video helped a lot! Subscribed.

mytransfriendbobbie
Автор

My mind is blown looking at the resistor idea😮😮😮😮

akarshmishra
Автор

Great Project, I'm going to build it to play with my son, I was thinking if it could be possible to transform the project in a reaction/fitness trainer putting all the buttons on the same side and using 1 display for the score and the other for timer countdown. I expect that all the wiring is the same and just some coding needed, what do you think?

Ricuncu
Автор

i love this but one question can this be adapted for just one player as my son wants to build this but only for one

unholycanine_tv
Автор

Hi, first of all thanks and congratulations. Is is really brilliant! I am currently building something similar (less brilliant, of course), and paying the fact I am almost totally inexpert in electronics. However, the prototype is working on the breadboard. My question for you is (sorry if it is stupid): I am waiting the delivery of the pushbuttons (for the "real" game) like the ones you used (12v), and, if I understood well, you have been able to power them directly from Arduino (5v) by changing the built-in resistor. If this is true, did you use 250 Ohm resistors? Or could you please suggest me how to calculate it? Many thanks for sharing the project and again congratulations!

alfredalf
Автор

With an arduino uno, do you have to replace the resistors?

TheAutisticWorldAwesome-
Автор

Fantastic project!
I have a few questions...
1. Is it possible to increase the buttons to 8 per player?
2. Can the displays be stacked to increase the size of the display?
3. Is it possible to add a sound effect everytime a button is pressed?
4. Can the difficulty be changed? (flash for shorter duration)
Thanks...

yashmohan
Автор

Question: In the code you provided, what does the if statement for the (step counter > action speed) do? Why do we need it and what's the purpose of printing the action_speed value?

Thank you again for this tutorial! I'm excited to try it.

jessiediep
Автор

Do you have a picture of what you did underneath the motherboard? First time building and I am a little lost.

christineanderson
Автор

Hi. I really like your video. Just had a few questions. I'm working on an arduino whack a mole project on tinkercad that involves two arduinos, LCD Display, LED lights and two 7 segment displays. The goal is to play the game and it has levels like easy medium hard and when the user begins to play each level a message should appear on the LCD screen such as "Easy Level" before the LED lights start flashing and throughout each level the score should be recorded on the 7 segment display and the time should count down from 20s (on the LCD display) for each level. I'm not sure how to make the timer loop on its own as it seems I cannot have 2 void loops in my code. I want to make the code so that it fits the vision of this game as I described above.

bhavnas
Автор

Hi, I've recreated the game that u guys made on this video and all the connections are correctly done, but i have some issues, the issue that i have is that the buttons dont affect the score for player one and it incrementally increases the score without pressing any buttons . Can you guys resolve this problem please .

vktus_
Автор

I have built this and LED Display is not working correctly, it appears the segments are not in order, until a few plays into game, then they align showing correct numbering. Then at end, the Winner/Looser display is reading right to left (backward). Any help?

iwebexp
Автор

Hey Guys! Great Project! I have a question, how do you wire the Player 1 and Player 2 buttons? I don’t see them mentioned in the code. I’m currently building the exact project. Everything is working perfect. Is just the player’s button what I can’t figure out yet. Thanks guys. Cheers!

thespot
Автор

Is there a way to have just one player take their turn, then the score is stored in the display and then the second layer takes their turn after a timer is up for their go and the scores are displayed

optimusprime
Автор

Cool project! Where can I buy the motherboard with the screw-terminals?

emmanuelay
Автор

Hola. Esos botones grandes son de 110v no? Solo el led integrado es de 12v.

BeatFusion
welcome to shbcf.ru