Skip to Main Content

Apply Now to the University of Wyoming apply now


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

1000 E. University Ave. Laramie, WY 82071
UW Operators (307) 766-1121 | Contact Us | Download Adobe Reader

Accreditation | Virtual Tour | Emergency Preparedness | Employment at UW | Privacy Policy | Harassment & Discrimination | Accessibility Accessibility information icon