Components and supplies
5 mm LED: Green
Breadboard (generic)
Arduino UNO
9V battery (generic)
keypad
Jumper wires (generic)
SG90 Micro-servo motor
5 mm LED: Red
Resistor 220 ohm
Project description
Code
Code
c_cpp
Code
c_cpp
Downloadable files
Back View
Back View
Back View
Back View
Front View
Front View
Comments
Only logged in users can leave comments
Anonymous user
2 years ago
i cant find the circuit diagram!
bschae5081
2 years ago
It's a great project. Here's the thing. Try hitting random keys with 4, 2, 7 randomly thrown in there. It still unlocks. Any way to fix that?
hofhiens621
a year ago
See my most recent comment.
kaivalya19
2 years ago
In my same code it is showing that Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno" Multiple libraries were found for "Servo.h" lock:2:10: fatal error: Keypad.h: No such file or directory Used: C:\\Users\\Admin\\Documents\\Arduino\\libraries\\Servo #include <Keypad.h> Not used: C:\\Program Files (x86)\\Arduino\\libraries\\Servo ^~~~~~~~~~ compilation terminated. exit status 1 Keypad.h: No such file or directory This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. Can you help me out.Please
UrekMazino
2 years ago
You should download the respective library Sketch >> Include Library >> Manage Libraries.. >> It sill show a new window, look for the library "Keypad" by Mark Stanley and Install it It sill show a new window, look for the library "Servo" by Michael Margolis and Install it Those are the one that should solve this.
Anonymous user
2 years ago
Ive never attempted any of these projects. Is there a more clear wiring schematic that I can follow. Or step by step instructions?
Anonymous user
2 years ago
https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view
gregarduino
2 years ago
Hi. I see that there is no shematic for the wiring of this project. I created one based on the code. You can go check it out with the link below. https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view?usp=sharing
mediumrhinoceros294
2 years ago
thanks, it looks helpful
zackkennedy42
2 years ago
The code isn't working for me and I am a beginner, any code that I can try would be much appreciated.
JohanSanju06
2 years ago
Really a great project..... My first ever arduino project....... Can you share the schematic clearly as i cannot understand where the pin is located. Thank you and once again great project
geek25
2 years ago
gregarduino posted a schematic
charlielidstone
2 years ago
Very neat. I'm trying to create a lock system with much of the same parts you are using, but I'm wondering how your code knows the value of the user input when all the keys are represented using chars. I'm pretty new to the keypad library as well as using arrays so forgive me if I don't make sense. -charlie
nijlvaraan
2 years ago
to me it gives the error: C:\\Users\\XXXX\\Documents\\Arduino\\code_keypad\\code_keypad.ino:6:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] char* password = "XXX"; ^~~~~ can anyone help me please?
Anonymous user
2 years ago
Did you figure it out? I am having the same problem.
Anonymous user
2 years ago
PLEASE I NEED THE VIDEO ABOUT THE PROJECT
Anonymous user
2 years ago
Hello, I see you guys understand how a keypad works, can you help me in my project plz ?
Anonymous user
2 years ago
Simple but very cool code. It works perfectly. Congratulations. Jorge
Anonymous user
2 years ago
Hi. I see that there is no shematic for the wiring of this project. I created one based on the code. You can go check it out with the link below. https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view?usp=sharing
Anonymous user
2 years ago
where is the circuit diagram
hockey1alex
2 years ago
thanks so much
geek25
2 years ago
thanks
Anonymous user
2 years ago
Any one help me with keypad programing. I need to run a program based on the input entered using keypad. For example. If i press 1000 in key pad and press a push button the led to be glow one second. If i press the start button again it should run a program again for one second. * button to clear the input # button to confirm the input. Any one can help me with coding
Anonymous user
2 years ago
Thank you so much for sharing your ideas with us! It will be a big help for us whose an amateur of this
Anonymous user
2 years ago
i havent touched an arduino in years and im out of practice, but i remember trying to write a program similar to this years ago. if im not mistaken, this code has teh same issue, correct me if im wrong.... basically, if i remember correctly, the code says the pw position is 0, and if the key entered is a correct pw char, then the position advances one, and when it advances 3 positions, the lock opens. so, again, correct me if im wrong here, but this means that if someone comes up and randomly hits, say "66987676898678686876-4-4567896568587698765986576-2-98324058923583420580834058509-7" the lock will open because the 4, 2, and 7 advanced it 3 steps, but there is no instance for incorrect inputs. really, if someone wanted to hack it intelligently, they would just enter 0-9 until it opens, max of 3x assuming a 3 digit code (less than 2x in this instance).
Anonymous user
2 years ago
where is diagram
Anonymous user
2 years ago
Hi. I see that there is no shematic for the wiring of this project. I created one based on the code. You can go check it out with the link below. https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view?usp=sharing
Anonymous user
2 years ago
awesome project!!! love it. thank you so much
Anonymous user
2 years ago
I really like the project but in the code the "#include<Keypad.h>" is giving me error. It tells ,e that doesn't exist. Could you please help me. I really like the project.
Anonymous user
2 years ago
I have the exact same problem, please tell me if you solved it.
Anonymous user
2 years ago
do you still need help? i got the solution
Anonymous user
2 years ago
you need to download the library from the sketch. if you go to Sketch>Include Library>Manage Library and from there download the library
Anonymous user
2 years ago
I am having the same problem
Anonymous user
2 years ago
Where is the proper schematic for this project? Still love the Idea though !!
catlover856
3 years ago
awesome project!!! love it. thank you so much
bschae5081
3 years ago
It's a great project. Here's the thing. Try hitting random keys with 4, 2, 7 randomly thrown in there. It still unlocks. Any way to fix that?
ueb0906519
3 years ago
PLEASE I NEED THE VIDEO ABOUT THE PROJECT
ragingxfire
3 years ago
I keep geting this error:C:\\Users\\----\\Documents\\Arduino\\code\\code.ino:5:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] char* password = "427"; // change the password here, just pick any 3 numbers ^~~~~
Anonymous user
3 years ago
Any one help me with keypad programing. I need to run a program based on the input entered using keypad. For example. If i press 1000 in key pad and press a push button the led to be glow one second. If i press the start button again it should run a program again for one second. * button to clear the input # button to confirm the input. Any one can help me with coding
roneliosevilla26
3 years ago
Thank you so much for sharing your ideas with us! It will be a big help for us whose an amateur of this
kaivalya19
4 years ago
In my same code it is showing that Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno" Multiple libraries were found for "Servo.h" lock:2:10: fatal error: Keypad.h: No such file or directory Used: C:\\Users\\Admin\\Documents\\Arduino\\libraries\\Servo #include <Keypad.h> Not used: C:\\Program Files (x86)\\Arduino\\libraries\\Servo ^~~~~~~~~~ compilation terminated. exit status 1 Keypad.h: No such file or directory This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. Can you help me out.Please
UrekMazino
2 years ago
You should download the respective library Sketch >> Include Library >> Manage Libraries.. >> It sill show a new window, look for the library "Keypad" by Mark Stanley and Install it It sill show a new window, look for the library "Servo" by Michael Margolis and Install it Those are the one that should solve this.
zackkennedy42
4 years ago
The code isn't working for me and I am a beginner, any code that I can try would be much appreciated.
manchas08
4 years ago
I really like the project but in the code the "#include<Keypad.h>" is giving me error. It tells ,e that doesn't exist. Could you please help me. I really like the project.
Anonymous user
2 years ago
you need to download the library from the sketch. if you go to Sketch>Include Library>Manage Library and from there download the library
Anonymous user
2 years ago
I have the exact same problem, please tell me if you solved it.
Anonymous user
2 years ago
do you still need help? i got the solution
macbrlink
2 years ago
I am having the same problem
Anonymous user
4 years ago
i havent touched an arduino in years and im out of practice, but i remember trying to write a program similar to this years ago. if im not mistaken, this code has teh same issue, correct me if im wrong.... basically, if i remember correctly, the code says the pw position is 0, and if the key entered is a correct pw char, then the position advances one, and when it advances 3 positions, the lock opens. so, again, correct me if im wrong here, but this means that if someone comes up and randomly hits, say "66987676898678686876-4-4567896568587698765986576-2-98324058923583420580834058509-7" the lock will open because the 4, 2, and 7 advanced it 3 steps, but there is no instance for incorrect inputs. really, if someone wanted to hack it intelligently, they would just enter 0-9 until it opens, max of 3x assuming a 3 digit code (less than 2x in this instance).
charlielidstone
4 years ago
Very neat. I'm trying to create a lock system with much of the same parts you are using, but I'm wondering how your code knows the value of the user input when all the keys are represented using chars. I'm pretty new to the keypad library as well as using arrays so forgive me if I don't make sense. -charlie
zimo_96
4 years ago
Hello, I see you guys understand how a keypad works, can you help me in my project plz ?
Anonymous user
5 years ago
Where is the proper schematic for this project? Still love the Idea though !!
nijlvaraan
5 years ago
to me it gives the error: C:\\Users\\XXXX\\Documents\\Arduino\\code_keypad\\code_keypad.ino:6:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] char* password = "XXX"; ^~~~~ can anyone help me please?
Anonymous user
2 years ago
Did you figure it out? I am having the same problem.
Anonymous user
5 years ago
i cant find the circuit diagram!
adeebjbmcmi
5 years ago
where is diagram
Anonymous user
5 years ago
Ive never attempted any of these projects. Is there a more clear wiring schematic that I can follow. Or step by step instructions?
Anonymous user
2 years ago
https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view
JohanSanju06
5 years ago
Really a great project..... My first ever arduino project....... Can you share the schematic clearly as i cannot understand where the pin is located. Thank you and once again great project
geek25
2 years ago
gregarduino posted a schematic
Anonymous user
6 years ago
Simple but very cool code. It works perfectly. Congratulations. Jorge
hockey1alex
2 years ago
thanks so much
geek25
2 years ago
thanks
Anonymous user
2 years ago
where is the circuit diagram
gregarduino
4 years ago
Hi. I see that there is no shematic for the wiring of this project. I created one based on the code. You can go check it out with the link below. https://drive.google.com/file/d/1cDwoOGePrVwzq2nr6Vq05JQnBwQedhgd/view?usp=sharing
3 Team members on this project
66
hofhiens621
a year ago
I also tested the code and found it not quite worthy of burglars. The code only waits for the correct keys to be pressed, while any keys pressed in between will not matter. There are two if statements within lines 33 - 41; replace them with this code and it will work. I also included the serial print statements so you can see your inputs in the serial monitor. if(key != NO_KEY) { if (key == '*' || key == '#') { position = 0; LockedPosition(true); Serial.println(key); } if (key != password[position]) {position = 0; LockedPosition(true); Serial.println(key); } if (key == password[position]) { position ++; Serial.println(key); } }