An electronic security padlock implemented with an Arduino.
- A password is entered (the default value: 1234) performed by pressing the numbers.
- If correct, the motor will operate alternating between locking and unlocking.
- It switches by using a count system under lock_count, which is by default 0.
- Once entered correctly the count is incremented by 1, but if entered correctly again the count is then re-set to 0. 0 = locked, 1 = unlocked. This is accomplished by the motor gets power to either line, whilst the other is set as ground.
- If the password is entered incorrectly a buzzer is sounded and the failed attempt is logged. This is done by using failed_password, the attempts can be viewed by pressing B.
- Attempts are re-set once the correct password is entered. This allows the user to see if anyone has tried to use the system before them.
- The password can also be re-set by pressing the A key, where the user has to re-enter the password to confirm.