{"id":662,"date":"2017-03-20T21:58:57","date_gmt":"2017-03-20T21:58:57","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=662"},"modified":"2017-03-20T21:58:57","modified_gmt":"2017-03-20T21:58:57","slug":"how-to-control-2-arduino-boards-at-the-same-time-with-mit-app-inventor","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=662","title":{"rendered":"How To Control 2 ARDUINO Boards At The Same Time With MIT App Inventor"},"content":{"rendered":"<h1>This tutorial will show you how to connect to and control two arduino boards at the same time with MIT App inventor 2.<\/h1>\n<h2>click on video below for full tutorial&#8230;.<\/h2>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"How To Control 2 ARDUINO Boards At The Same Time With MIT App Inventor\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/d2zp892_WZQ?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<h2><\/h2>\n<h2><\/h2>\n<h2>MIT App Inventor Blocks:<\/h2>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-666\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks.png?w=300\" alt=\"\" width=\"654\" height=\"484\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks.png 2064w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks-300x222.png 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks-768x569.png 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/03\/blocks-1024x758.png 1024w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>ARDUINO sketch:<\/h2>\n<p>int led=8;<br \/>\nint x = 1;<br \/>\nvoid setup() {<br \/>\npinMode(led, OUTPUT);<br \/>\nSerial.begin(9600);<br \/>\n}<\/p>\n<p>void loop() {<\/p>\n<p>if (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 == 1000 &amp;&amp; x == 1)<br \/>\n{<br \/>\ndigitalWrite(led, HIGH);<br \/>\nx = 2;<br \/>\n}<br \/>\nelse if (val == 1000 &amp;&amp; x == 2)<br \/>\n{<br \/>\ndigitalWrite(led, LOW);<br \/>\nx = 1;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<h2>Check us out on Facebook&#8230;.. \u00a0 \u00a0 \u00a0\u00a0https:\/\/www.facebook.com\/zarduino\/<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to connect to and control two arduino boards at the same time with MIT App inventor 2. click on video below for full tutorial&#8230;. &nbsp; MIT App Inventor Blocks: &nbsp; ARDUINO sketch: int led=8; &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=662\">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-662","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/662","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=662"}],"version-history":[{"count":0,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/662\/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=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}