Whack-A-MoLED

Sahil Joshi, Laurent Man

Description:

We want to simulate a whack-a-mole arcade game using LEDs as moles, buzzer as the noise when the mole is hit, and a push button to whack the moles. We will also be displaying a leader board on the OLED display on the maker board and show the score while the player is playing the game. The way we have decided to adjust the score is increment 1 point when the player whacks a led correctly and decrement 1 point when the player whacks the led incorrectly. The game will also increase in difficulty as the player continues playing the game.

Moles are alive!

  • This was our initial game setting, where we were trying to use resistors along with the pins' pull-up resistor. We discovered that we actually don't need resistor as that leads to dimming of the LEDs, so we reverted back to the pull-up resistor.

  • Buzzer has been configured to make noise when a mole pops up.

  • We are still waiting for the bigger LEDs and breadboard to make the game setting look elegant.

Moles can be hit!

  • We have finished setting up the game components. (8 pins will be used, bigger LEDs = more fun)

  • We also have setup the OLED to display score on every button click. The user gains a point for every mole hit, and loses a point for every mole missed.

  • The moles have started appearing randomly and the player is able to hit them by clicking the button.

Whack-A-MoLED.MOV

TODO's

  • We need to figure out what might be an ideal interval time for the moles to appear one after the other. How fast should they start appearing when a player starts hitting consecutively? (1 day)

  • We are working on making a leader board which will either be displayed on the computer or the OLED. Still thinking if OLED is good for that. (1 day)

  • Note that the video has some LED glitches in between - but we have fixed that since at that time we were trying to experiment between Polling and Interrupt Service Routines.

  • One roadblock we hit and solved was - updating the score on the OLED display after every button click. We were using interrupts to detect the change, but due to the delays between appearing of moles we were not able to achieve what we wanted. We were able to figure out a way using Polling instead as learnt in class. One more interesting thing that we learned was - how to burn a LED! Connecting the LED to 5V without a resistor burnt it and we learned a good lesson.

GAME IN ACTION!!!

IMG_6265.MOV