Chapter 4 Simon Says

Now that you’re familiar with C’s syntax and how to interface with the Pi’s GPIO pins, let’s use the skills you learned in the last chapter to create our own version of the electronic “Simon Says” game. In case you’re not familiar with the game, the original design has four colored light-up buttons, each of which plays a sound. The machine lights the buttons in a random sequence, and the player has to repeat the sequence exactly. If they match the sequence, the computer adds another random step, and the game continues. Our version will differ in that it won’t play a musical tone, and we’re going to use five LEDs and switches ...

Get Jumpstarting C now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.