Hi everyone! I'm new here, and I'm new with Arduino as well. My work project consists on blinking all LEDs with the minimum of clicks possible.
I have a picture attached a picture which shows the circuit. It's in portuguese but I'll translate it:
"pressButton - door 12 - which serves as reset
pressButton - door 11 - which chooses/hits the LED that's on
9 LEDs that are on to win the game"
And this is what needs to happen:
"1.Turn on the LEDs in a sequence. The program starts by turning on the LED during a certain period of time (which can be 1/2 a second, 1 second or another period of time - time_transition_led). If the LED hasn't been discovered, it should turn off and turn on the next one. If the LED has been discovered, the same stays on, as the program continues to turn on the LEDs one after another. This sequence is related to the connection between the doors, the first LED is connected to door 2, the second to door 3 etc.
2.Reset. The reset button (door 12) turns off all LEDs already discovered and restarts the sequence of turning on the LEDs. That means, after the reset, all LEDs are turned off and have to restart on the first LED (door 2) as well as the number of clicks already given.
3.Discovery. The button of choosing/hitting the LED makes it possible to hit on the LED. The discovery is done when a LED is turned on and there's a click by the time it's turned on. For example, if LED 3 is turned on and on that moment the button is pressed, LED 3 needs to stay turned on, as it was discovered. The number of clicks needs to step up when the button is pressed.
4.Victory. The functionnality of victory makes all discovered LEDs blink for 20 seconds. After that, all LEDs are turned off and the game restarts. During the presentation of the victory, we need to display the number of clicks given to discover the LEDs, in the serial monitor."
Here's a link that shows how it should look like: Descoberta do LED - YouTube
I would like to ask your help to know how I can write my code to make this happen. I have 0 experience programming and working with Arduino, and I also have to do this on Tinkercard. What I'm really asking is not to give me the full code, but rather to help me understand what kind of code I could write and explain me what it's going to do, give me some lights on how to make it happen. It's the best way for me to learn at this point
Thanks a lot if you have the patience to help me out!