{"id":703,"date":"2017-04-03T23:15:00","date_gmt":"2017-04-03T23:15:00","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=703"},"modified":"2020-10-12T16:34:49","modified_gmt":"2020-10-12T16:34:49","slug":"how-to-make-two-arduino-boards-bluetooth-communicate-with-each-other","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=703","title":{"rendered":"How To Make Two ARDUINO Boards Bluetooth Communicate With Each Other"},"content":{"rendered":"<h1>This tutorial will show you how to use a HC-05 And A HC-06 with your ARDUINO boards to send data between them via Bluetooth connection.<\/h1>\n<h2>Click on video below for full tutorial&#8230;<\/h2>\n<p><iframe loading=\"lazy\" title=\"How To Make Two ARDUINO Boards Bluetooth Communicate With Each Other\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/3WR2-HT_MiQ?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><iframe loading=\"lazy\" title=\"How to properly connect your HC-05 &amp; HC-06 bluetooth board to your ARDUINO\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/9OlceW1W1yU?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<h1>Parts List:<\/h1>\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=8a4895dba9b0953ca09e25294da656ea\">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=hc-05&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d935ffbfe7b74b6736d68efcdc543ecc\">HC-05<\/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=hc-06&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=bfde564d1a1ad5d7159871920537d48b\">HC-06<\/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=logic level converter&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=f2c606e344ccf10bac4f87e27afabe02\">Logic lvl Converters<\/a><\/p>\n<h1>ARDUINO CODE:<\/h1>\n<h2>HC-05 Master board code:<\/h2>\n<p>int val;<br \/>\n#define button 3<br \/>\nvoid setup() {<br \/>\nSerial.begin(9600);<br \/>\npinMode(button, INPUT);<br \/>\n}<\/p>\n<p>void loop() {<br \/>\nval = digitalRead(button);<br \/>\nif (val == HIGH)<br \/>\n{<br \/>\nSerial.write(100);<br \/>\ndelay(500);<br \/>\n}<br \/>\ndelay(50);<br \/>\n}<\/p>\n<h2>HC-06 Slave Board Code:<\/h2>\n<p>#define led 2<br \/>\nint pos = 0;<br \/>\nint val;<br \/>\nvoid setup() {<br \/>\nSerial.begin(9600);<br \/>\npinMode(led,OUTPUT);<\/p>\n<p>}<\/p>\n<p>void loop() {<br \/>\nif(Serial.available() &gt; 0)<br \/>\n{<br \/>\nval = Serial.read();<br \/>\nif (val==100 &amp;&amp; pos==0)<br \/>\n{<br \/>\ndigitalWrite(led,HIGH);<br \/>\npos = 1;<br \/>\n}<br \/>\nelse if(val==100 &amp;&amp; pos==1)<br \/>\n{<br \/>\ndigitalWrite(led,LOW);<br \/>\npos = 0;<br \/>\n}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to use a HC-05 And A HC-06 with your ARDUINO boards to send data between them via Bluetooth connection. Click on video below for full tutorial&#8230; Parts List: #affiliate links# ARDUINO BOARD HC-05 HC-06 &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=703\">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-703","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/703","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=703"}],"version-history":[{"count":2,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/703\/revisions"}],"predecessor-version":[{"id":1603,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/703\/revisions\/1603"}],"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=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}