{"id":787,"date":"2017-07-28T23:17:03","date_gmt":"2017-07-28T23:17:03","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=785"},"modified":"2019-03-26T21:56:48","modified_gmt":"2019-03-26T21:56:48","slug":"how-to-make-two-arduino-microcontrollers-talk-to-each-other","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=787","title":{"rendered":"How To Make Two ARDUINO Microcontrollers Talk To Each Other"},"content":{"rendered":"<h1>This tutorial will show you how to make two ARDUINO Microcontroller boards serial communicate with each other&#8230;<\/h1>\n<h2>Click on video below for full tutorial..<\/h2>\n<p><iframe loading=\"lazy\" title=\"How To Make Two ARDUINO Microcontrollers Talk To Each Other\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/3juUMOnw7L0?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><a href=\"https:\/\/www.facebook.com\/zarduino\/\"><strong>Check us out on Facebook!<\/strong><\/a><\/h1>\n<h2>ARDUINO Sketches:<\/h2>\n<h1>Transmitter:<\/h1>\n<p>int val;<br \/>\n#define button 2<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(250);<br \/>\n}<br \/>\n}<\/p>\n<h1>Receiver:<\/h1>\n<p>#define led 2<br \/>\nint val;<br \/>\nint pos = 0;<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>}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to make two ARDUINO Microcontroller boards serial communicate with each other&#8230; Click on video below for full tutorial.. Check us out on Facebook! ARDUINO Sketches: Transmitter: int val; #define button 2 void setup() { &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=787\">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-787","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/787","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=787"}],"version-history":[{"count":1,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/787\/revisions"}],"predecessor-version":[{"id":1271,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/787\/revisions\/1271"}],"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=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}