{"id":789,"date":"2017-08-15T14:32:13","date_gmt":"2017-08-15T14:32:13","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=789"},"modified":"2019-10-20T18:28:19","modified_gmt":"2019-10-20T18:28:19","slug":"arduino-keypad-password-door-lock-keyless-entry","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=789","title":{"rendered":"ARDUINO Keypad Password Door Lock (keyless entry)"},"content":{"rendered":"<h1>In this tutorial we will look at how to build a ARDUINO Keypad Door Lock.<\/h1>\n<p><iframe loading=\"lazy\" title=\"ARDUINO Keypad Password Door Lock (keyless entry)\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/lJVrfISoQ5s?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Parts List:<\/h2>\n<p>affiliate links:<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d068f02315b1f0fe9991109865e56d6b\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO board<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino keypad&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=7460df4f7d2d50ccf0f3dc5bf613ec19\" target=\"_blank\" rel=\"noopener noreferrer\">Keypad<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino relay&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=8a26a48dac8335e801d2dcb88a20b643\" target=\"_blank\" rel=\"noopener noreferrer\">Relay<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino breadboard&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=287d10f916d2cf45350b940f8ebffa33\" target=\"_blank\" rel=\"noopener noreferrer\">BreadBoard<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=2fd2655438d46d495971528fc9981f9a\" target=\"_blank\" rel=\"noopener noreferrer\">Jumper wires<\/a><\/p>\n<h2>SCHEMATIC:<\/h2>\n<h1><span style=\"color: #ff0000;\">Sorry it got Lost!<\/span><\/h1>\n<h2>ARDUINO CODE:<\/h2>\n<p>#define lock 12<br \/>\n#include &lt;Password.h&gt;<br \/>\n#include &lt;Keypad.h&gt;<br \/>\nPassword password = Password (&#8220;123A&#8221;);<br \/>\nconst byte ROWS = 4;<br \/>\nconst byte COLS = 4;<br \/>\nchar keys[ROWS][COLS] = {<br \/>\n{&#8216;1&#8242;,&#8217;2&#8242;,&#8217;3&#8242;,&#8217;A&#8217;},<br \/>\n{&#8216;4&#8242;,&#8217;5&#8242;,&#8217;6&#8242;,&#8217;B&#8217;},<br \/>\n{&#8216;7&#8242;,&#8217;8&#8242;,&#8217;9&#8242;,&#8217;C&#8217;},<br \/>\n{&#8216;*&#8217;,&#8217;0&#8242;,&#8217;#&#8217;,&#8217;D&#8217;}<br \/>\n};<br \/>\nbyte rowPins[ROWS] = {9, 8, 7, 6}; \/\/connect to the row pinouts of the keypad<br \/>\nbyte colPins[COLS] = {5, 4, 3, 2}; \/\/connect to the column pinouts of the keypad<br \/>\nKeypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );<\/p>\n<p>void setup()<br \/>\n{<br \/>\npinMode(lock,OUTPUT);<br \/>\nkeypad.addEventListener(keypadEvent);<\/p>\n<p>}<\/p>\n<p>void loop()<br \/>\n{<br \/>\nkeypad.getKey();<br \/>\n}<\/p>\n<p>void keypadEvent(KeypadEvent eKey)<br \/>\n{<br \/>\nswitch (keypad.getState())<br \/>\n{<br \/>\ncase PRESSED:<br \/>\nswitch (eKey)<br \/>\n{<br \/>\ncase &#8216;*&#8217;: checkPassword(); break;<br \/>\ncase &#8216;#&#8217;: password.reset(); break;<br \/>\ndefault: password.append(eKey);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>void checkPassword()<br \/>\n{<br \/>\nif (password.evaluate())<br \/>\n{<br \/>\ndigitalWrite(lock,HIGH);<br \/>\ndelay(1000);<br \/>\ndigitalWrite(lock,LOW);<br \/>\npassword.reset();<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\ndigitalWrite(13,HIGH);<br \/>\ndelay(1000);<br \/>\ndigitalWrite(13,LOW);<br \/>\npassword.reset();<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will look at how to build a ARDUINO Keypad Door Lock. Parts List: affiliate links: ARDUINO board Keypad Relay BreadBoard Jumper wires SCHEMATIC: Sorry it got Lost! ARDUINO CODE: #define lock 12 #include &lt;Password.h&gt; #include &lt;Keypad.h&gt; &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=789\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-789","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=789"}],"version-history":[{"count":3,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/789\/revisions"}],"predecessor-version":[{"id":1495,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/789\/revisions\/1495"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}