{"id":795,"date":"2017-09-21T17:13:58","date_gmt":"2017-09-21T17:13:58","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=795"},"modified":"2017-09-21T17:13:58","modified_gmt":"2017-09-21T17:13:58","slug":"how-to-build-a-arduino-controlled-window-or-door-alarm","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=795","title":{"rendered":"How to build a ARDUINO controlled window or door alarm"},"content":{"rendered":"<h1>This tutorial will show you how to build a window or door alarm using a ARDUINO board and photo interrupters or magnetic sensors&#8230;<\/h1>\n<p>Click on video below for full tutorial&#8230;<\/p>\n<p><iframe loading=\"lazy\" title=\"How to build a ARDUINO controlled window or door alarm\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/SnSRcDrxXRk?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<p>&nbsp;<\/p>\n<h2>Parts List:<\/h2>\n<p>ARDUIUNO board<\/p>\n<p>speaker<\/p>\n<p>photo interrupter or magnetic sensor<\/p>\n<p>&nbsp;<\/p>\n<h2>SCHEMATIC:<\/h2>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/09\/door_alarm_schem.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-796\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/09\/door_alarm_schem.jpg?w=300\" alt=\"\" width=\"641\" height=\"575\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/09\/door_alarm_schem.jpg 894w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/09\/door_alarm_schem-300x269.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/09\/door_alarm_schem-768x688.jpg 768w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>ARDUINO Code:<\/h2>\n<p>#define s1 2<br \/>\nint v1;<br \/>\n#define spk 9<br \/>\nvoid setup() {<br \/>\nSerial.begin(9600);<br \/>\npinMode(s1, INPUT);<br \/>\npinMode(spk, OUTPUT);<br \/>\n}<\/p>\n<p>void loop() {<br \/>\nv1 = digitalRead(s1);<br \/>\nif (v1 == HIGH)<br \/>\n{<br \/>\ntone(spk, 500, 250);<br \/>\ndelay(250);<br \/>\ntone(spk, 1000, 250);<br \/>\ndelay(250);<br \/>\n}<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to build a window or door alarm using a ARDUINO board and photo interrupters or magnetic sensors&#8230; Click on video below for full tutorial&#8230; &nbsp; Parts List: ARDUIUNO board speaker photo interrupter or magnetic &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=795\">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-795","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/795","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=795"}],"version-history":[{"count":0,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/795\/revisions"}],"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=795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}