Whack
Last Updated: 7/26/18
Here is a simple and fun project to help learn a few Arduino programming concepts. This is based on the classic arcade game in which a half-dozen “moles” pop up their heads in random locations and times. The player objective is to bop the moles on the head as soon as they appear. It’s harder than it sounds since moles disappear as quickly as they appear.
In our game we’ll have only two moles, represented by LEDs. To bop a mole, we have only a few milliseconds to hit the mole’s pushbutton as soon as the light comes on. We’ll learn about: the random number generator, timers, and flow charts.

The presentation material and the code can be downloaded at Whack-a-mole.
Contact Us
College of Engineering and Physical Sciences
Engineering Education and Research Building (EERB)
- Room 401
- 1000 E. University Ave
- Laramie, WY 82071
- Dept. 3295
- Email: enginfo@uwyo.edu
- Phone: (307) 766-4253
The University of Wyoming has earned its Research Level 1 (R1) status from the Carnegie Classification of Institutions of Higher Education, placing Wyoming's only four-year university with the top research universities in the United States.
