I'm doing a combination lock for a project, and I want to do a circuit that disables the password checker if its check the wrong password 3 times.
This is almost working, the problem is that if it's given the right password, the counter increses too, so it locks even if it's the correct password.
I think the problem is that the counter it's increasing before checking if the led is lit or not (if it's lit, the AND gateb

This is almost working, the problem is that if it's given the right password, the counter increses too, so it locks even if it's the correct password.
I think the problem is that the counter it's increasing before checking if the led is lit or not (if it's lit, the AND gateb

