When you're staying at home for hours on end, you remember the little things that used to bring you joy in your childhood. Our clients reached out to us saying their children hadn't ever played the classic, arcade staple game Whack-A-Mole. We couldn't have this, so we created a game similar with just a breadboard and LaunchPad. We added a few extra features to the original game to keep it interesting, but the idea is the same. One of the four LEDs on the board light up, and you must push the button corresponding to the alight LED before the timer runs out on the display. Each time you press a button, the LEDs light up faster and faster. Try to keep up with the timer and see how fast you can go!
Main Features:
- Seven Segment Display: Display the timer and also the score at the end of the game.
- Musics: Play the Happy Birthday song while displaying your score and play different notes for different LED position.
- Potentiometer: Take control of the music's volume.
- Piezzo-Speaker: The basic component to play any kind of music you want while celebrating your achieved score.
- Tilt Switch: Restart the game by tilting the board.
What could be better! We decided to use one of our very own team members as the face of marketing. Adding the cowboy boats and loin stickers kids love, we're sure that our product will be a hot sell. Enjoyment is built-in with the John-Guaranty!
Part One: Setting up the BaseWe are going to start off by connecting the booster pack to the breadboard and the LaunchPad. Fit the pins on the LaunchPad into the booster pack. Then, fit the set of pins on the booster closer to the end into the breadboard, starting at the first pin at the top to make room for all of the wires. Then starting from the bottom of the breadboard, place in four buttons along the middle one after the other, such that the left part of the button is along column e and the right part of the button is along column f. Then, place the 7-segment display directly above the buttons. It should look like this:
Now that the base is set up, it's time to start connecting the wires. For this project, we can use any of the pins in a row for the wires (i.e. a, b, c, d, or e) interchangeably. In other words, only the right side or left side of the breadboard matter, and the row number matters. Also, when we refer to negative or positive, they are the columns on the right and left sides of the board. The row number isn't relevant for them, so place the wires in such a way that maximizes space. For example: “R1” means that you can connect from any pin on row 1 on the right side of the board. So pin 1a, 1b, 1c, 1d, and 1e are all possible connections.
We are going to connect the following pins together.
You should end up with something similar to this when you're finished. Remember to put them in the correct way. :)
Here's a video of the setup to help.
Part Three: Adding the Code and PlayingNow that we're finished setting up the game itself, hook the board up to your computer, download the code that's linked below, and run it! One of the LEDs on your breadboard will light up, so press the button on your breadboard that corresponds to the position of the LED within the timeframe specified on the 7-segment display. Each time you press the correct button before the timer ends, the timer will speed up. If you press an incorrect button or the timer runs out, the game ends and your score will be displayed in a loop. You can tilt the board to the right to play again.
Build the board and share with us your highest score!!!
Comments
Please log in or sign up to comment.