Memory game with PiFace Digital

Difficulty: easy

Think you have what it takes to beat your friends in this game of memory?

Play PiFace Digital memory game

To play this memory game, that is similar to Simon, first open a Terminal and download the files with the following command
git clone

Once the files have downloaded, run the game by entering the command
python3 pifaceMemoryGame/

To play the game, watch which LED lights up and press the corresponding button. The sequence will increase by one each time making the game harder as it goes on.

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

The lights will turn on and off more quickly as the game progresses. When you get the sequence wrong, the game will end and print your score in the Terminal you ran the game from.

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

Now open the game in your favourite text editor

Navigate down to this line return 1<< 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