{"id":642,"date":"2019-03-18T17:58:12","date_gmt":"2019-03-18T14:58:12","guid":{"rendered":"http:\/\/www.aydiner.gen.tr\/?p=642"},"modified":"2022-01-30T22:07:01","modified_gmt":"2022-01-30T19:07:01","slug":"arduino-el-salla-uygulamasi","status":"publish","type":"post","link":"https:\/\/www.aydiner.gen.tr\/index.php\/2019\/03\/18\/arduino-el-salla-uygulamasi\/","title":{"rendered":"Arduino El Salla Uygulamas\u0131"},"content":{"rendered":"<p><a href=\"https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-641\" src=\"https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla-150x150.png\" alt=\"\" width=\"150\" height=\"150\" data-id=\"641\" srcset=\"https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla-150x150.png 150w, https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla-300x300.png 300w, https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla-100x100.png 100w, https:\/\/www.aydiner.gen.tr\/wp-content\/uploads\/2019\/03\/elsalla-266x266.png 266w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:default decode:true\">#include &lt;Servo.h&gt;\r\n\r\nint pirPin=6;\r\nint servoPin=13;\r\nint hareket;\r\nint led=7;\r\nServo motor;\r\n\r\n\r\n\r\nvoid setup() {\r\n  \r\n\r\nmotor.attach(servoPin);\r\npinMode(pirPin,INPUT);\r\npinMode(led,OUTPUT);\r\n\r\n}\r\n\r\nvoid loop() {\r\n\r\n\r\nhareket=digitalRead(pirPin);\r\n\r\nif(hareket==HIGH){\r\n  motor.write(150);\r\n  digitalWrite(led,HIGH);\r\n  delay(250);\r\n  motor.write(30);\r\n  delay(250);\r\n  motor.write(150);\r\n  delay(250);\r\n  motor.write(30);\r\n  delay(250);\r\n  motor.write(150);\r\n  delay(250);\r\n  motor.write(30);\r\n  delay(250);\r\n  motor.write(90);\r\n}\r\nelse{\r\n  motor.write(90);\r\n    digitalWrite(led,LOW);\r\n}\r\n  \r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; &nbsp; &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":641,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[24,26,27,25],"class_list":["post-642","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ino","tag-arduino","tag-el-salla","tag-pir-arduino","tag-servo"],"_links":{"self":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts\/642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/comments?post=642"}],"version-history":[{"count":0,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/posts\/642\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/media\/641"}],"wp:attachment":[{"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/media?parent=642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/categories?post=642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aydiner.gen.tr\/index.php\/wp-json\/wp\/v2\/tags?post=642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}