Inspiration

The inspiration for the project comes from the well known arcade game whack a mole.

What it does

The game measures the average reaction time for pressing a push button for a maximum of 10 times. The C code compares whether the correct button is pressed, corresponding to the LED lit on the board, or if a false start is detected.

How we built it

The game uses four push buttons connected to inputs PM0-PM3 on the microcontroller, each with a 1k ohm resistor connected to ground. It employs the analog-to-digital converter (ADC), and a pseudo-random value is generated from the triangular waveform of the Analog Discovery This value is then used to determine which of the four LEDs will be turned on.

Challenges we ran into

Since Keil lacks a collaborative working environment, it was occasionally challenging to troubleshoot each other's code. Additionally, due to the complexity of this code, it is prone to faults that may be difficult to catch without using a debugger.

Accomplishments that we're proud of

During the project, we encountered numerous obstacles, but we overcame them as a team. Thus, we're proud of how we collaborated and motivated each other to complete our idea. We fostered a creative team dynamic, and helped one another regardless of the difficulty. We also feel accomplished with how we faired with somewhat-foreign software and hardware. Even though we had to learn on the fly, we had a lot of fun doing it. We also troubleshooted our code and machinery, which is difficult with a new compiler such as Keil uVision5.

What we learned

Working on Monkey Smash taught us about microcontrollers, C interpreters, ADC, waveform generators, but most importantly, teamwork. Some of us had prior experience in these technical fields, while others were proficient in different ways. Our strengths complemented our weaknesses, so we were able to maximize our time working on the project. Working with microcontroller was especially fun because of its onboard features, such as the ADC. We learned to program the GPIO pins and configure our waveforms to randomize values, which allowed us to develop Monkey Smash!

What's next for Monkeysmash

What's next for Monkeysmash

Although we're satisfied with its completion, we have big plans for Monkeysmash in the future. For example, instead of using a single-button hit, we'd like to incorporate multiple buttons. This may require more GPIO pins and more microcontrollers. Also, we'd like to refine the front-end aspect a little more by creating a high score system, or even putting the breadboard in a personalized box!

Built With

  • ad2
  • c
  • keil
  • msp432e401y
Share this project:

Updates