Stupid Pet Trick – Whack a Mole

I wanted to make some kind of a game for the stupid pet trick assignment, and I’ve decided to make a whack-a-mole.

The rule is simple.

  1. You whack the LED “mole” with the joy stick. When you miss 5 moles in a row, it’s a game over.
  2. You can see the score on top of the bread board. This will tell you how many moles you have missed. When you whack a mole, it resets after flashing.
  3. You can change the speed (difficulty) of the game by turning the potentiometer. It gets impossibly difficult when you turn it all the way.


Here is a video of the game.

The code looks like this.


here is the soldered potentiometer.

Leave a Reply