# Combination Lock
Everything is controlled using the CLOCK, RESET, and 8 Pin SWITCH.
The first step after starting the simulation is pressing RESET.
## Setting a Passcode
To set a passcode, IN0 will need to be set to HIGH for the duration
of the setup. Then, create a combination of IN1, IN2, IN3, and IN4.
This will be your passcode after setting IN0 back to LOW. The passcode
can be reset anytime with IN0.
OUT 0~3 represent the current password of the lock.
## Unlocking
To unlock the combination lock, you will set IN1, IN2, IN3, and IN4 to
the previous combination in `Setting a Passcode`. To verify, set IN5
to HIGH. If correct, the LED at OUT4 will go HIGH.
The lock will only be in an unlocked state if IN5 is held at HIGH.
Returning IN5 back to LOW will lock the combination lock again.
## Number of Attempts
The user will only have 3 tries to get the right combination before
the input pins IN1, IN2, IN3, and IN4 become locked (unusable). Once the
lock become unusable, OUT5 will go LOW. A press of the RESET button will
turn it back to normal.
Loading
tt-block-input
tt-block-input
Loading
tt-block-output
tt-block-output
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Loading
tt-block-bidirectional-io
tt-block-bidirectional-io
Bidirectional I/O pins