Skip to Main Navigation. Each navigation link will open a list of sub navigation links.

Skip to Main Content

Apply to the University of Wyoming apply now

Global Resource Navigation

Visit Campus
Download UW Viewbook
Give to UW

Engineering Summer Program for Teachers - 2017

Whack-a-mole

Author: Bob Kubichek, University of Wyoming

Date: 5/22/2017

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.

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

Twitter Icon Youtube Icon Instagram Icon Facebook Icon

Accreditation | Emergency Preparedness | Employment at UW | Gainful Employment | Privacy Policy | Accessibility Accessibility information icon