{"id":837,"date":"2017-12-24T15:06:12","date_gmt":"2017-12-24T15:06:12","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=837"},"modified":"2017-12-24T15:06:12","modified_gmt":"2017-12-24T15:06:12","slug":"learning-arduino-for-beginners-ep21-dht11-and-dht22-temp-and-humidity-sensor","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=837","title":{"rendered":"learning Arduino for beginners EP#21 DHT11 and DHT22 temp and humidity sensor"},"content":{"rendered":"<h1>In this episode we will take a look at how you can use the dht11 or dht22 temperature and humidity sensor with your Arduino board..<\/h1>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"learning Arduino for beginners EP#21 DHT11 &amp; DHT22 temp and humidity sensor.\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/TLkij_Pv0C8?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<p>&nbsp;<\/p>\n<h2>ARDUINO Code:<\/h2>\n<p>#include &lt;SimpleDHT.h&gt;<br \/>\n#define pinDHT11 6 \/\/data pin<br \/>\nSimpleDHT11 dht11;<\/p>\n<p>void setup() {<br \/>\nSerial.begin(9600);<\/p>\n<p>}<\/p>\n<p>void loop() {<br \/>\nbyte temperature = 0;<br \/>\nbyte humidity = 0;<br \/>\ndht11.read(pinDHT11, &amp;temperature, &amp;humidity, NULL);<br \/>\nint temperature2 = (temperature * 1.8 + 32);<br \/>\nSerial.print(&#8220;temperature = &#8220;);<br \/>\nSerial.print(temperature);<br \/>\nSerial.println(&#8220;C&#8221;);<br \/>\nSerial.print(&#8220;temperature = &#8220;);<br \/>\nSerial.print(temperature2);<br \/>\nSerial.println(&#8220;F&#8221;);<br \/>\nSerial.print(&#8220;humidity = &#8220;);<br \/>\nSerial.print(humidity);<br \/>\nSerial.println(&#8220;%&#8221;);<br \/>\ndelay(1000);<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this episode we will take a look at how you can use the dht11 or dht22 temperature and humidity sensor with your Arduino board.. &nbsp; &nbsp; &nbsp; ARDUINO Code: #include &lt;SimpleDHT.h&gt; #define pinDHT11 6 \/\/data pin SimpleDHT11 dht11; void &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=837\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":809,"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-837","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/837","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=837"}],"version-history":[{"count":0,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/837\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/809"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}