{"id":395,"date":"2016-12-11T22:30:57","date_gmt":"2016-12-11T22:30:57","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=395"},"modified":"2020-10-12T16:36:31","modified_gmt":"2020-10-12T16:36:31","slug":"how-to-receive-multiple-sensor-readings-from-your-arduino-into-your-mit-app-inventor-2-app","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=395","title":{"rendered":"How To Receive Multiple Sensor Readings From Your ARDUINO Into Your MIT APP INVENTOR 2 APP"},"content":{"rendered":"<h1>The following tutorial will show you how to receive multiple sensor readings from your arduino board into you MIT APP INVENTOR \u00a02 APP.<\/h1>\n<h3>If you are using more than one sensor with your Arduino project you have found that it is necessary\u00a0to send that data and display it on your app. To do this you\u00a0will need to send all \u00a0the sensors data at one time, then split it apart and display it in the appropriate fields in your MIT APP INVENTOR APP. THIS IS HOW YOU DO IT!!!!!!<\/h3>\n<h1>For A Video Tutorial On How To Do This Click Below, Otherwise scroll down for The other information&#8230;.<\/h1>\n<p><iframe loading=\"lazy\" title=\"How To Receive Multiple Sensor Readings From Your ARDUINO Into Your MIT APP INVENTOR 2 APP\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/5YovICoYCLg?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\/\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color: #ff0000;\">Check us out on Facebook!<\/span><\/a><\/h1>\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=dht11&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=540ca4ff0e047f6e091128891d8bc622\" target=\"_blank\" rel=\"noopener noreferrer\">DHT11<\/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=photo resistor&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=c0b4f2125d34669433a9b35a8811ab5c\" target=\"_blank\" rel=\"noopener noreferrer\">Photo Resistor<\/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=resistors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=8702a5268fd8e880f5a8474142b01aac\" target=\"_blank\" rel=\"noopener noreferrer\">resistor<\/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=arduino board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=dee384f27762a6aa54ced82c92ce6e26\" target=\"_blank\" rel=\"noopener noreferrer\">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-06&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=4ac4343c6997c6e5169731aafbceab4c\" target=\"_blank\" rel=\"noopener noreferrer\">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=e3f44984d3a5a76e5d61c36b848ed9ca\" target=\"_blank\" rel=\"noopener noreferrer\">Logic level Converter<\/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=arduino bread board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=82664ee390f1ca9752522adb2a4fbf3e\" target=\"_blank\" rel=\"noopener noreferrer\">Bread 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=arduino bread board and jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=0f392fa6bfa00d2b91da369ae5fcb043\" target=\"_blank\" rel=\"noopener noreferrer\">Jumper Wires<\/a><\/p>\n<h1><\/h1>\n<h1>SCHEMATIC<\/h1>\n<p>The only thing that needs to be talked about in the schematic it the Photo Resistor, I used a 100K\u03a9 photo resistor with a 50K\u03a9 resistor set up as a voltage divider to read the current light level. If you use a different value photo resistor it will work just remember to use a resistor of half the resistance of the photo resistor in the voltage divider.<\/p>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-411\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem.jpg?w=300\" alt=\"dht11_schem\" width=\"605\" height=\"282\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem.jpg 1674w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem-300x140.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem-768x359.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/dht11_schem-1024x479.jpg 1024w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<h1>Check out this link if your having problems with the code!<\/h1>\n<h1><a href=\"https:\/\/youtu.be\/t3km2svfL3M\" target=\"_blank\" rel=\"noopener noreferrer\">Why code you copy from a website does not work in your arduino IDE<\/a><\/h1>\n<h1>THE ARDUINO SKETCH:<\/h1>\n<p>#include &lt;SimpleDHT.h&gt;<br \/>\nint pinDHT11 = 2;<br \/>\nSimpleDHT11 dht11;<br \/>\n#define light (A1)<br \/>\nint lvl;<br \/>\nvoid setup() {<br \/>\nSerial.begin(9600);<br \/>\n}<\/p>\n<p>void loop() {<\/p>\n<p>byte temperature = 0;<br \/>\nbyte humidity = 0;<br \/>\nif (dht11.read(pinDHT11, &amp;temperature, &amp;humidity, NULL))<br \/>\n{<br \/>\nreturn;<br \/>\n}<br \/>\nlvl = analogRead(light);<br \/>\nSerial.print((int)temperature);<br \/>\nSerial.print(&#8221; C&#8221;);<br \/>\nSerial.print(&#8220;|&#8221;);<br \/>\nSerial.print((int)humidity);<br \/>\nSerial.print(&#8221; %&#8221;);<br \/>\nSerial.print(&#8220;|&#8221;);<br \/>\nSerial.println(lvl);<br \/>\ndelay(5000);<br \/>\n}<\/p>\n<h1><a href=\"https:\/\/drive.google.com\/open?id=0B0ZYw2jO5Q3DWVlkZTRRaFVJcW8\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for a copy of the app!<\/a><\/h1>\n<h1>MIT APP INVENTOR BLOCKS:<\/h1>\n<p>For some reason some of the blocks are not showing up but i think you will be able to figure out how this app is put together, the true and false blocks &amp; some of the text blocks are not showing up but there data is being shown..<\/p>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-404\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks.png?w=300\" alt=\"blocks\" width=\"692\" height=\"473\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks.png 2229w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks-300x205.png 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks-768x525.png 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2016\/12\/blocks-1024x700.png 1024w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/a><\/p>\n<h2><a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">Check us out on Facebook!<\/a><\/h2>\n<h1><a href=\"https:\/\/thezhut.com\/?page_id=10\">Check out my other projects &amp; tutorials here!<\/a><\/h1>\n","protected":false},"excerpt":{"rendered":"<p>The following tutorial will show you how to receive multiple sensor readings from your arduino board into you MIT APP INVENTOR \u00a02 APP. If you are using more than one sensor with your Arduino project you have found that it &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=395\">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-395","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/395","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=395"}],"version-history":[{"count":3,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/395\/revisions"}],"predecessor-version":[{"id":1605,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/395\/revisions\/1605"}],"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=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}