void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
In order to light the final red LED, you must set the correct switches 2-7.
You must then set turn ON switch 8 to enter your guess.
Code is correct.
Enter has been pressed.
Access Granted?.
PADLOCK
Once you guess the code, try setting your own padlock combination!
Key code: Switches 2-7
Enter the Combo
Additional challenge: Adding an Entry Button
If a hacker wanted to, they could have a computer feed every possible combination of inputs until they stumbled upon the corect code.
One way to reduce the vulnerability is to add an entry button, so access won't be granted unless the code is correct AND the entry button has been pressed.
Can you modify the circuit so that once that with a successful code and press of the entry button, access is granted indefinitely? (e.g. the LED stays ON)
(Pull-down resistor is just for correct initialization)