Can this be done? Touch sensor programming

This is what im trying to do overall

for my front door i want to remove the standard door nob and lock, I have it setup on a mag lock system and built a casing for all of the components. I want to make a combination of 1 - 6 equal the password to unlock my door.

Let's say I wanted my password to be 1 2 3 4 5 6 im trying to have it reject and reset any time you push a configuration thats not 1 2 3 4 5 6 like if I pushed 1 2 5 it would start over.

I have the maglock int as a output

int MAGLOCK = 13

pinMode(MAGLOCK,OUTPUT);

and all of that in the right area where it's suppose to be but im just having alot of trouble with the combo keys and getting them to reset and wait for the next set.

Im trying to write the code for it but no such luck :frowning: but now that im far into this Im starting to think this is impossible ...

Hint: we can't see your code.

Let's say I wanted my password to be 1 2 3 4 5 6 im trying to have it reject and reset any time you push a configuration thats not 1 2 3 4 5 6 like if I pushed 1 2 5 it would start over.

That makes it trivially easy to guess your combo. If it starts over or doesn't then it is telling me when I get some numbers right. I only have to try 36 possibilities at most. You might as well not even have a lock if you're going to make it that easy to bypass.

@Delta_G - Okay so ill add more I dont see the problem if your not here to help why bother posting you have added nothing to the efforts of ANY of the questions I have asked your only comment is to tell me not to do it... Great thanks

@AWOL

int MAGLOCK = 13
int TOUCHPAD1 = 7
int TOUCHPAD2 = 8
int TOUCHPAD3 = 9
int TOUCHPAD4 = 10
int TOUCHPAD5 = 11
int TOUCHPAD6 = 12

void setup() {
pinMode(MAGLOCK,OUTPUT);

pinMode(TOUCHPAD1,INPUT);
pinMode(TOUCHPAD2,INPUT);
pinMode(TOUCHPAD3,INPUT);
pinMode(TOUCHPAD4,INPUT);
pinMode(TOUCHPAD5,INPUT);
pinMode(TOUCHPAD6,INPUT);
}

I dont have anything else in it because I couldnt do it and needed to remove it all so nothing is currently in the loop part since I clearly dont know what im actually doing I just thought someone could point me in the right direction some video or tutorial.

Im not asking for well documented all coded out ill put in the work but I dont know if its even possible now that im this far I feel kinda stupid to not check if its EVEN a thing that can be done in this thing?

northlight:
@Delta_G - Okay so ill add more I dont see the problem if your not here to help why bother posting you have added nothing to the efforts of ANY of the questions I have asked your only comment is to tell me not to do it... Great thanks

Sorry I tried to tell you your lock will be easy to pick. All you need to do to stop that is NOT make it reset as soon as it sees the first wrong number. Make it ALWAYS require 6 digits before it tells you right or wrong. That means a person has to choose 46656 guesses instead of only 36. That makes it way harder to guess.

Please don't be all shitty just because the help I give you isn't the help you want. It's still help. I wasn't trying to be mean. I was trying to help you not get your lock broken as soon as you build it. If you don't like that then just ignore it and let your stuff get stolen. I don't care. It doesn't hurt me one bit if you want to have a shitty attitude about this and end up with your stuff stolen.
I'm just trying to help you see a flaw in your design that you obviously missed.

northlight:
Im not asking for well documented all coded out ill put in the work but I dont know if its even possible now that im this far I feel kinda stupid to not check if its EVEN a thing that can be done in this thing?

Yes, not only is it possible to do but if you will put in just a little tiny bit of research you'll find tons of tutorials out there where people have built combination locks with Arduino. The only difference is that they don't usually do that bit where they start over at the first wrong digit because it is a really bad idea. But again, if you're trying to make it easy to steal your stuff then that is your prerogative.

Okay, the reality is you didnt have to comment at all you could have just not.

Does this information help me? Yes and no but I highly doubt drug addicts are going to play several rounds of guess the number.

My currently lock can be pushed too hard and it jumps the lock, wind has opened my door before during harsh storms. I am renting and I got approval to upgrade the lock.

The main question im asking is.... Is It Possible... is the project I have in my hands something thats even possible, cause now that im on to the coding part im lost.

So no in a way your information that you just needed to tell me like "why even bother" and "whats the point if you can guess" doesn't matter if this chipset isnt capable of actually doing anything like that.

You are not a white knight your not "just trying to help" stop playing the victim because you didnt expect me to find you alittle annoying after i just went through tons of questions I had and your only retort was "why ***** bother if you dont know what your doing?" Like cheers mate thanks for your MOUNDS of help im sooooo greatful lol

northlight:
So no in a way your information that you just needed to tell me like "why even bother" and "whats the point if you can guess" doesn't matter if this chipset isnt capable of actually doing anything like that.

You need to work on your reading skills. I told you how to fix it as well. I didn't say don't build the lock. I said build the lock so that it actually protects something.

I had and your only retort was "why **** bother if you dont know what your doing?"

That's not even close to what I said. Where did I say that? I said don't build a lock that tells you what the combination is. Build a lock where you have to know the combination to get in. I don't think you realized the flaw in your design.

Again, if you don't like it just ignore it and get your stuff stolen. I don't care. But you don't get to tell me what to say or where to say it. If I want to I'll post cat pictures on your thread. You don't get to tell me what to do.

So no in a way your information that you just needed to tell me like "why even bother" and "whats the point if you can guess" doesn't matter if this chipset isnt capable of actually doing anything like that.

Obvoisly Arduino can do this. Have you tried putting "Arduino combination lock" into Google? You'll find complete instructions on how to do this if you want them. Don't act like you need someone here to tell you whether or not it is possible just because you're too lazy to type three words into a google search bar.

Forget it ill just figure it out myself thanks 16000+ posts and all you got is "make it hard or give up and get your **** stolen" like hey thanks wont be coming back to this community for any advice soon good job

While you work out your attitude issues, here are some lovely kittens to help you feel better:

cute-kittens-31-57b30ad5ccbc8__605.jpg

northlight:
Forget it ill just figure it out myself thanks 16000+ posts and all you got is "make it hard or give up and get your shit stolen" like hey thanks wont be coming back to this community for any advice soon good job

That's not what I said either. Man you need to work on your reading skills. I said, "it is easy to guess because of this, so don't do this one thing." Nobody told you to give up. Get real kid.

I only told you to go ahead and get your stuff stolen when you decided to take an attitude about it all. And still, I don't care if you take my advice and make it a good lock or not. That's up to you. I'm just pointing out a way to make it better. If you don't want a good lock that's your prerogative. Make a crummy lock if you want a crummy lock. I'm not stopping you.