{"id":620,"date":"2018-01-20T10:37:16","date_gmt":"2018-01-20T09:37:16","guid":{"rendered":"http:\/\/stigern.net\/blog\/?p=620"},"modified":"2018-01-21T11:37:43","modified_gmt":"2018-01-21T10:37:43","slug":"using-wemos-d1-mini-sht30-sensor-shield","status":"publish","type":"post","link":"https:\/\/stigern.net\/blog\/using-wemos-d1-mini-sht30-sensor-shield\/","title":{"rendered":"Using Wemos D1 Mini with SHT30 Sensor Shield"},"content":{"rendered":"<p>SHT30 is a temperature and humidity sensor, almost the same as DHT22 only much smaller. They also measure a larger range, from -40 to 125 C.<\/p>\n<p><a href=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/WemosD1SHT30.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-622\" src=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/WemosD1SHT30-300x205.jpg\" alt=\"\" width=\"300\" height=\"205\" srcset=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/WemosD1SHT30-300x205.jpg 300w, https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/WemosD1SHT30-768x524.jpg 768w, https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/WemosD1SHT30.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Parts:<\/strong><\/p>\n<p>What we need is a Wemos D1 Mini board, which can be found on Aliexpress for around 5$. And of course the SHT30 shield can also be found on Aliexpress for a few dollars.<\/p>\n<p><a href=\"https:\/\/www.aliexpress.com\/wholesale?catId=0&amp;initiative_id=SB_20180120011604&amp;SearchText=SHT30\" target=\"_blank\" rel=\"noopener\">SHT30 @ Aliexpress<\/a><\/p>\n<p><a href=\"https:\/\/www.aliexpress.com\/wholesale?catId=0&amp;initiative_id=SB_20180120011646&amp;SearchText=wemos+d1+mini\" target=\"_blank\" rel=\"noopener\">Wemos D1 Mini @ Aliexpress<\/a><\/p>\n<p><strong>Code:<\/strong><\/p>\n<p>Next up is installing the <a href=\"https:\/\/github.com\/wemos\/WEMOS_SHT3x_Arduino_Library\" target=\"_blank\" rel=\"noopener\">Arduino Library<\/a> for the SHT30, unzip in libraries folder and restart Arduino IDE.<\/p>\n<p>Then in Arduino IDE select the example called SHT30_SHIELD, or use example code below,\u00a0 just to verify that our sensor is working correctly.<\/p>\n<p>[codesyntax lang=&#8221;c&#8221; lines=&#8221;no&#8221; title=&#8221;Basic Example&#8221;]<\/p>\n<pre>#include &lt;WEMOS_SHT3X.h&gt;\r\n\r\nSHT3X sht30(0x45);\r\n\r\nvoid setup() {\r\n\r\n  Serial.begin(115200);\r\n\r\n}\r\n\r\nvoid loop() {\r\n\r\n  if(sht30.get()==0){\r\n    Serial.print(\"Temperature in Celsius : \");\r\n    Serial.println(sht30.cTemp);\r\n    Serial.print(\"Temperature in Fahrenheit : \");\r\n    Serial.println(sht30.fTemp);\r\n    Serial.print(\"Relative Humidity : \");\r\n    Serial.println(sht30.humidity);\r\n    Serial.println();\r\n  }\r\n  else\r\n  {\r\n    Serial.println(\"Error!\");\r\n  }\r\n  delay(1000);\r\n\r\n}<\/pre>\n<p>[\/codesyntax]<\/p>\n<p>Then open up the serial monitor and you should see it reporting temperature and humidity:<\/p>\n<p><a href=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/SerialMonitorSHT30.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-626 size-full\" src=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/SerialMonitorSHT30.jpg\" alt=\"\" width=\"644\" height=\"193\" srcset=\"https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/SerialMonitorSHT30.jpg 644w, https:\/\/stigern.net\/blog\/wp-content\/uploads\/2018\/01\/SerialMonitorSHT30-300x90.jpg 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/a><\/p>\n<p>Thats it! Now play around with it. Hope this short guide was helpful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SHT30 is a temperature and humidity sensor, almost the same as DHT22 only much smaller. They also measure a larger range, from -40 to 125 C. Parts: What we need is a Wemos D1 Mini board, which can be found on Aliexpress for around 5$. And of course the SHT30 shield can also be found [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,4],"tags":[16,140,368,45,369,367],"class_list":["post-620","post","type-post","status-publish","format-standard","hentry","category-arduino-electronics","category-electronics","tag-arduino","tag-electronics-2","tag-esp8266","tag-programming","tag-sht30","tag-wemos"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/comments?post=620"}],"version-history":[{"count":7,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/posts\/620\/revisions\/635"}],"wp:attachment":[{"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/media?parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/categories?post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stigern.net\/blog\/wp-json\/wp\/v2\/tags?post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}