Reaction game with PiFace Digital

Difficulty: easy

Challenge your friends to beat your highscore of this fast paced reaction game.

Play PiFace Digital reaction game

To play this reaction game that is similar to Whack-A-Mole, first open a Terminal and download the files with the following command
git clone

Once the files have finished downloading, play the game by entering the command
python3 pifaceReactionGame/

When the game starts an LED will light up on the PiFace Digital board and you have to hit the corresponding button as quickly as possible. Hit the wrong one and you will lose points. The game will end after you have missed a lot of the hits.

Note: The LEDs and buttons on PiFace Digital have their numbers printed next to them.

If you have buttons connected to your PiFace Digital you can play this game with all eight LEDs. To do this, first copy the reaction game to your home directory
cp pifaceReactionGame/ ~

Now open the game in your favourite text editor

Navigate down to this line return random.randint(0,3) and change the number 3 to one less than the number of buttons you have connected (e.g. if you have 8 buttons, this number would be 7).

Save your changes then play this extended version with the command