I want Simon to activate a motor upon completion of the game, need help please!

Hello everyone!

My question is as follows and I’m hoping someone will chime in. I am working on a game that I’m building and I am new to the Arduino world. I’m looking for some help in how to add the correct code in to my existing code to have this game go a little further.

I have made the Simon Says game and successfully uploaded the code and tested. Now, if the player wins by completing all rounds of the memory game, I want to add code so that if player wins, then power a motor/actuator/relay/LED etc… I don’t know where to start to put the code in or even how the code should be written. All I know is that I would need the output on pin 8 or pin 11 as those are the only two I have open. Let’s keep it simple and have it just turn on a LED for 10 seconds and I’d be able to alter it from there.

Will anyone here be of some assistance and help with this? Thanks so much!

Using Arduino Uno R3, .ino file attached.

Simon_Buzzer_Two.ino (15.5 KB)

The play_winner() function would seem like a good place to add code to be executed when a player wins.
If you don't know how to make a pin go HIGH at that point then start by loading and looking at some of the examples in the IDE.