{"id":1091,"date":"2018-12-08T19:00:45","date_gmt":"2018-12-08T19:00:45","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=1091"},"modified":"2018-12-08T19:00:45","modified_gmt":"2018-12-08T19:00:45","slug":"arduino-mad-scientist-laboratory-ep-9-bluetooth-controlled-pan-tilt-platform","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=1091","title":{"rendered":"Arduino Mad Scientist Laboratory EP #9 Bluetooth controlled pan and tilt platform"},"content":{"rendered":"<h1 style=\"text-align:center;\">Today we will attempt to take over the world by building a smartphone Bluetooth controlled pan and tilt platform.<\/h1>\n<p><iframe loading=\"lazy\" title=\"Arduino Mad Scientist Laboratory: Bluetooth controlled pan &amp; tilt platform\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/VWsXPYfiYJI?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<h1><a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">Check us out on Facebook!<\/a><\/h1>\n<h2>The APP:<\/h2>\n<h1><a href=\"https:\/\/drive.google.com\/open?id=1tRfbOvqiQnmTCy_viJmL1AjC7Yh7laOn\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Click Here to download the APP<\/strong><\/a><\/h1>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2018\/12\/pan-tilt-blocks.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1095\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2018\/12\/pan-tilt-blocks.png?w=273\" alt=\"\" width=\"645\" height=\"709\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2018\/12\/pan-tilt-blocks.png 847w, https:\/\/thezhut.com\/wp-content\/uploads\/2018\/12\/pan-tilt-blocks-273x300.png 273w, https:\/\/thezhut.com\/wp-content\/uploads\/2018\/12\/pan-tilt-blocks-768x844.png 768w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<h2>ARDUINO Code:<\/h2>\n<p>#include &lt;Servo.h&gt;<\/p>\n<p>Servo servo1;<br \/>\nServo servo2;<\/p>\n<p>void setup() {<br \/>\nSerial.begin(9600);<br \/>\nservo1.attach(3); \/\/servo 1<br \/>\nservo1.write(90);<br \/>\nservo2.attach(5); \/\/servo 2<br \/>\nservo2.write(90);<\/p>\n<p>}<\/p>\n<p>void loop() {<br \/>\nif (Serial.available() &gt;= 2 )<br \/>\n{<br \/>\nunsigned int a = Serial.read();<br \/>\nunsigned int b = Serial.read();<br \/>\nunsigned int val = (b * 256) + a;<br \/>\nif (val &gt;= 0 &amp;&amp; val &lt;= 180) \/\/ servo 1<br \/>\n{<br \/>\nval=map(val,0,180,180,0);<br \/>\nservo1.write(val);<br \/>\n}<br \/>\nelse if (val &gt;= 1000 &amp;&amp; val &lt;= 1180) \/\/ servo 2<br \/>\n{<br \/>\nval=map(val,1000,1180,1180,1000);<br \/>\nservo2.write(val-1000);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we will attempt to take over the world by building a smartphone Bluetooth controlled pan and tilt platform. &nbsp; Check us out on Facebook! The APP: Click Here to download the APP ARDUINO Code: #include &lt;Servo.h&gt; Servo servo1; Servo &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=1091\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1009,"menu_order":6,"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-1091","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1091","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=1091"}],"version-history":[{"count":0,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1091\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1009"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}