SIMON 7

In this project, we're going to add in our final sequence when the user makes a mistake and we drop through the while: loop. 

When this happens, we want to do the following: 

  1. If the user has lost due to a time-out (he didn't hit a button in time), we light up all the LEDs 

  2. If the user has lost due to hitting a wrong button in the sequence, we light up the LED that was incorrectly pressed 

  3. We then play an error tone 

  4. Finally, we play the correct sequence one last time (quickly)

Here is what that code will look like:


Here is what the final code for this project looks like:



prev| next