{"id":10866,"date":"2023-08-13T14:22:14","date_gmt":"2023-08-13T06:22:14","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=10866"},"modified":"2024-05-05T12:32:01","modified_gmt":"2024-05-05T04:32:01","slug":"sht30-%e6%b8%a9%e6%b9%bf%e5%ba%a6%e4%bc%a0%e6%84%9f%e5%99%a8","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=10866","title":{"rendered":"SHT30 \u6e29\u6e7f\u5ea6\u4f20\u611f\u5668"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.iyatt.com\/?p=10866\/#%E5%89%8D%E8%A8%80\" >\u524d\u8a00<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.iyatt.com\/?p=10866\/#Arduino\" >Arduino<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.iyatt.com\/?p=10866\/#%E7%AE%80%E6%98%93%E6%B8%A9%E6%B9%BF%E5%BA%A6%E8%AE%A1\" >\u7b80\u6613\u6e29\u6e7f\u5ea6\u8ba1<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.iyatt.com\/?p=10866\/#%E6%A0%91%E8%8E%93%E6%B4%BE\" >\u6811\u8393\u6d3e<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E5%89%8D%E8%A8%80\"><\/span>\u524d\u8a00<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u4e4b\u524d\u7528\u8fc7 DHT11 \u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\uff0c\u6d4b\u91cf\u8303\u56f4\u548c\u7cbe\u5ea6\u90fd\u6bd4\u8f83\u6709\u9650\uff0c\u8fd9\u6b21\u8bd5\u4e86\u4e00\u4e0b SHT30\uff0c\u5c31\u597d\u5f88\u591a\uff0c\u5c31\u662f\u4ef7\u683c\u66f4\u8d35\u3002SHT30 \u662f SHT3x \u7cfb\u5217\u4e2d\u7684\u4e00\u79cd\uff0c\u5c5e\u4e8e\u4f4e\u4ef7\u7248\uff0cSHT31 \u662f\u6807\u51c6\u7248\uff0cSHT35 \u662f\u9ad8\u7aef\u7248\u672c\uff0c\u4ef7\u683c\u4e00\u4e2a\u6bd4\u4e00\u4e2a\u8d35\uff0c\u7cbe\u5ea6\u4e5f\u66f4\u9ad8\uff0c\u53ef\u4ee5\u652f\u6301\u6570\u5b57\uff08IIC\uff09\u548c\u6a21\u62df\u4fe1\u53f7\u8f93\u51fa\uff0c\u6211\u4e70\u7684\u662f\u53ea\u63a5\u4e86\u6570\u5b57\u8f93\u51fa\u7684\u677f\u5b50\u3002\u53e6\u5916\u8fd9\u4e2a\u7cfb\u5217\u7684\u4f20\u611f\u5668\u5185\u90e8\u6709\u52a0\u70ed\u5668\uff0c\u901a\u8fc7\u7279\u5b9a\u6307\u4ee4\u6253\u5f00\u6216\u5173\u95ed\uff0c\u6bd4\u5982\u5728\u9ad8\u6e7f\u5ea6\u6216\u8005\u5bb9\u6613\u51b7\u51dd\u7684\u73af\u5883\u4e2d\uff0c\u5f00\u542f\u52a0\u70ed\u6765\u964d\u4f4e\u8bef\u5dee\u4ee5\u53ca\u63d0\u9ad8\u54cd\u5e94\u901f\u5ea6\u3002<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691904051781.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 290px; --smush-placeholder-aspect-ratio: 290\/283;\" \/><br \/>\nSHT30\uff1a<br \/>\n\u6e29\u5ea6\u6d4b\u91cf\u8303\u56f4\uff1a<code>-40~125\u2103<\/code><br \/>\n\u6e29\u5ea6\u7cbe\u5ea6\uff1a<code class=\"katex-inline\">\\pm0.3\u2103<\/code><br \/>\n\u6e7f\u5ea6\u6d4b\u91cf\u8303\u56f4\uff1a<code class=\"katex-inline\">0\\sim100\\%RH<\/code><br \/>\n\u6e7f\u5ea6\u7cbe\u5ea6\uff1a<code class=\"katex-inline\">\\pm3\\%RH<\/code><\/p>\n<p>\u6e29\u6e7f\u5ea6\u53c2\u8003<br \/>\n\uff08\u6570\u636e\u6765\u6e90\u4e8e\u7f51\u7edc\uff0c\u4e2a\u4f53\u5b58\u5728\u5dee\u5f02\u3002\u53e6\u5916\u8fd9\u4e2a\u5e94\u8be5\u662f\u65e0\u98ce\u7684\u60c5\u51b5\u4e0b\uff0c\u7a7a\u6c14\u6d41\u52a8\u5bf9\u4f53\u611f\u4f1a\u6709\u5f71\u54cd\uff09\uff1a<\/p>\n<ul>\n<li>\u5f53\u73af\u5883\u6e29\u5ea6\u572818-25\u2103\uff0c\u76f8\u5bf9\u6e7f\u5ea6\u572840%-70%\u65f6\uff0c\u4eba\u4f53\u611f\u89c9\u6700\u8212\u9002;<\/li>\n<li>\u6e29\u5ea6\u572824-30\u2103\uff0c\u6e7f\u5ea6\u5c0f\u4e8e60%\u65f6\uff0c\u4eba\u4f53\u611f\u89c9\u70ed\uff0c\u4f46\u4e0d\u95f7;<\/li>\n<li>\u6e29\u5ea6\u9ad8\u4e8e30\u2103\uff0c\u6e7f\u5ea6\u5927\u4e8e70%\u65f6\uff0c\u4eba\u4f53\u611f\u89c9\u95f7\u70ed;<\/li>\n<li>\u6e29\u5ea6\u9ad8\u4e8e36\u2103\uff0c\u6e7f\u5ea6\u5927\u4e8e80%\u65f6\uff0c\u4eba\u4f53\u611f\u89c9\u95f7\u70ed\u96be\u5fcd\uff0c\u53d1\u6c57\u673a\u5236\u53d7\u963b\uff0c\u6781\u6613\u4e2d\u6691;<\/li>\n<li>\u4e9a\u6d32\u4eba\u8212\u9002\u6e29\u5ea6:18-25\u2103;<\/li>\n<li>\u590f\u5929\u6700\u4f73\u5ba4\u6e29:22-25\u2103\uff0c\u51ac\u5929:18-20\u2103;<\/li>\n<li>\u5a74\u513f\u6c90\u6d74\u6700\u4f73\u5ba4\u6e29:25-28\u2103\uff0c\u6c34\u6e29:36-38\u2103\u3002<\/li>\n<\/ul>\n<h1><span class=\"ez-toc-section\" id=\"Arduino\"><\/span>Arduino<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u8fd9\u91cc\u4f7f\u7528\u7684\u662f<br \/>\nArduino UNO<br \/>\nArduino IDE 2.1.1<br \/>\nClosedCube_SHT31D_Arduino 1.5.1\uff08\u5e93\uff09: <a href=\"https:\/\/github.com\/closedcube\/ClosedCube_SHT31D_Arduino\">https:\/\/github.com\/closedcube\/ClosedCube_SHT31D_Arduino<\/a><\/p>\n<p>\u793a\u4f8b\u7a0b\u5e8f<\/p>\n<pre><code class=\"language-cpp\">\/*\n\u4f20\u611f\u5668 - Arduino \u63a5\u7ebf\u5bf9\u7167:\n    VDD - 3.3V\n    GND - GND\n    SDA - A4\n    SCL - A5\n*\/\n\n#include &lt;Wire.h&gt;\n#include &lt;ClosedCube_SHT31D.h&gt;\n\nClosedCube_SHT31D sht3xd;\n\nvoid setup()\n{\n    Serial.begin(9600);\n    Serial.println(&quot;ClosedCube SHT3XD Library - \u5355\u8109\u51b2\u6a21\u5f0f\u793a\u4f8b&quot;);\n\n    sht3xd.begin(0x44);\n    Serial.print(&quot;SHT3XD \u7cfb\u5217 #&quot;);\n    Serial.println(sht3xd.readSerialNumber());  \n}\n\nvoid loop()\n{\n  \/\/ \u65f6\u949f\u62c9\u4f38\u6a21\u5f0f\n  \/\/ \u4f20\u611f\u5668\u5728\u63a5\u6536\u5230\u6d4b\u91cf\u547d\u4ee4\u540e\uff0c\u4f1a\u5c06I2C\u603b\u7ebf\u4e0a\u7684SCL\u7ebf\u62c9\u4f4e\uff0c\u76f4\u5230\u6d4b\u91cf\u5b8c\u6210\u5e76\u5c06\u6570\u636e\u5b58\u50a8\u5728\u5185\u90e8\u5bc4\u5b58\u5668\u4e2d\u3002\n  \/\/ \u7136\u540e\uff0c\u4f20\u611f\u5668\u4f1a\u91ca\u653eSCL\u7ebf\uff0c\u5141\u8bb8\u4e3b\u673a\u8bfb\u53d6\u6570\u636e\u3002\u8fd9\u79cd\u6a21\u5f0f\u7684\u4f18\u70b9\u662f\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u5b8c\u6574\u6027\uff0c\u4e0d\u4f1a\u56e0\u4e3a\u4e3b\u673a\u8bfb\u53d6\u8fc7\u65e9\u800c\u5bfc\u81f4\u6570\u636e\u9519\u8bef\u3002\n  \/\/ \u4f46\u662f\uff0c\u8fd9\u79cd\u6a21\u5f0f\u4e5f\u4f1a\u5360\u7528I2C\u603b\u7ebf\u7684\u65f6\u95f4\uff0c\u5f71\u54cd\u5176\u4ed6\u8bbe\u5907\u7684\u901a\u4fe1\u3002\n    printResult(&quot;mode1&quot;, sht3xd.readTempAndHumidity(SHT3XD_REPEATABILITY_LOW, SHT3XD_MODE_CLOCK_STRETCH, 50));  \n  delay(1000);\n  \/\/ \u8f6e\u8be2\u6a21\u5f0f\n  \/\/ \u4f20\u611f\u5668\u5728\u63a5\u6536\u5230\u6d4b\u91cf\u547d\u4ee4\u540e\uff0c\u4e0d\u4f1a\u62c9\u4f4eSCL\u7ebf\uff0c\u800c\u662f\u7acb\u5373\u8fd4\u56de\u4e00\u4e2a\u5e94\u7b54\u4fe1\u53f7\u3002\n  \/\/ \u7136\u540e\uff0c\u4f20\u611f\u5668\u5f00\u59cb\u6d4b\u91cf\uff0c\u5e76\u5c06\u6570\u636e\u5b58\u50a8\u5728\u5185\u90e8\u5bc4\u5b58\u5668\u4e2d\u3002\n  \/\/ \u4e3b\u673a\u9700\u8981\u4e0d\u65ad\u5730\u5411\u4f20\u611f\u5668\u53d1\u9001\u8bfb\u53d6\u547d\u4ee4\uff0c\u76f4\u5230\u4f20\u611f\u5668\u8fd4\u56de\u4e00\u4e2a\u5e94\u7b54\u4fe1\u53f7\u4e3a\u6b62\u3002\n  \/\/ \u8fd9\u79cd\u6a21\u5f0f\u7684\u4f18\u70b9\u662f\u53ef\u4ee5\u8282\u7701I2C\u603b\u7ebf\u7684\u65f6\u95f4\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5176\u4ed6\u8bbe\u5907\u7684\u901a\u4fe1\u3002\n  \/\/ \u4f46\u662f\uff0c\u8fd9\u79cd\u6a21\u5f0f\u4e5f\u6709\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u9519\u8bef\uff0c\u5982\u679c\u4e3b\u673a\u8bfb\u53d6\u8fc7\u65e9\u6216\u8fc7\u665a\uff0c\u90fd\u4f1a\u5f97\u5230\u9519\u8bef\u7684\u6570\u636e\u3002\n    printResult(&quot;mode2&quot;, sht3xd.readTempAndHumidity(SHT3XD_REPEATABILITY_HIGH, SHT3XD_MODE_POLLING, 50));\n    delay(1000);\n}\n\nvoid printResult(String text, SHT31D result)\n{\n    if (result.error == SHT3XD_NO_ERROR)\n  {\n        Serial.print(text);\n        Serial.print(&quot;: \u6e29\u5ea6 &quot;);\n        Serial.print(result.t);\n        Serial.print(&quot;\u2103, \u76f8\u5bf9\u6e7f\u5ea6 &quot;);\n        Serial.print(result.rh);\n        Serial.println(&quot;%&quot;);\n    }\n    else {\n        Serial.print(text);\n        Serial.print(&quot;: [\u9519\u8bef] \u4ee3\u7801 #&quot;);\n        Serial.println(result.error);\n    }\n}<\/code><\/pre>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691905576468.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 420px; --smush-placeholder-aspect-ratio: 420\/212;\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E7%AE%80%E6%98%93%E6%B8%A9%E6%B9%BF%E5%BA%A6%E8%AE%A1\"><\/span>\u7b80\u6613\u6e29\u6e7f\u5ea6\u8ba1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691912130354.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 639px; --smush-placeholder-aspect-ratio: 639\/800;\" \/><\/p>\n<p>\u8fd9\u4e2a\u56e0\u4e3a\u4f7f\u7528\u4e86 LCD\uff08IIC\uff09 \u663e\u793a\u5c4f\uff0c\u591a\u4e86\u4e00\u4e2a\u5e93 LiquidCrystal_I2C 1.1.2\uff1a<a href=\"https:\/\/github.com\/johnrickman\/LiquidCrystal_I2C\">https:\/\/github.com\/johnrickman\/LiquidCrystal_I2C<\/a><\/p>\n<p>\u8fd9\u4e2a\u5730\u65b9\u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\u548c LCD \u90fd\u662f\u4f7f\u7528\u7684 A4\u3001A5 \u5f15\u811a\u7528\u4f5c IIC \u901a\u4fe1\uff0c\u4e0d\u8fc7\u4e24\u8005\u5730\u5740\u4e0d\u540c\uff0c\u63a5\u5728\u4e00\u8d77\u4e5f\u80fd\u7528\u3002\u539f\u5148\u60f3\u7684\u662f\u7528\u516c\u5bf9\u516c\u7ebf\u4ece Arduino \u5f15\u51fa\u8fd9\u4e24\u6839\u7ebf\u5230\u9762\u5305\u677f\uff0c\u518d\u5206\u522b\u63a5\u4f20\u611f\u5668\u548c LCD\uff0c\u7ed3\u679c\u53d1\u73b0\u6ca1\u6709\u516c\u5bf9\u516c\u7ebf\u4e86\uff0c\u8fd9\u91cc\u5c31\u76f4\u63a5\u628a\u7ebf\u526a\u65ad\u7684\uff0c\u7136\u540e\u63a5\u5728\u4e00\u8d77\u3002<\/p>\n<pre><code class=\"language-cpp\">\/*\n\u4f20\u611f\u5668 - Arduino \u63a5\u7ebf\u5bf9\u7167:\n    VDD - 3.3V\n    GND - GND\n    SDA - A4\n    SCL - A5\n\nLCD - Arduino \u63a5\u7ebf\u5bf9\u7167:\n    VDD - 5V\n    GND - GND\n    SDA - A4\n    SCL - A5\n*\/\n\n#include &lt;LiquidCrystal_I2C.h&gt;\n#include &lt;Wire.h&gt;\n#include &lt;ClosedCube_SHT31D.h&gt;\n\nClosedCube_SHT31D sht3xd;\nLiquidCrystal_I2C lcd(0x27, 16, 2);\n\nvoid setup()\n{\n  sht3xd.begin(0x44);\n  lcd.init();\n  lcd.backlight();\n  lcd.clear();\n}\n\nvoid loop()\n{\n  static SHT31D data;\n\n  data = sht3xd.readTempAndHumidity(SHT3XD_REPEATABILITY_HIGH, SHT3XD_MODE_POLLING, 50);\n\n  lcd.clear();\n  lcd.setCursor(0, 0);\n  lcd.print(&quot;T=&quot;);\n  lcd.print(data.t);\n  lcd.print(&quot;C&quot;);\n  lcd.setCursor(0, 1);\n  lcd.print(&quot;RH=&quot;);\n  lcd.print(data.rh);\n  lcd.print(&quot;%&quot;);\n\n  delay(2000);\n}<\/code><\/pre>\n<hr \/>\n<p>2023.8.26<\/p>\n<p>\u5728 pdd \u4e0a\u82b1\u51e0\u5757\u94b1\u5f04\u4e86\u5757 Arduino Nano 168P<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1693036256234.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 500px; --smush-placeholder-aspect-ratio: 500\/185;\" \/><\/p>\n<p>\u63a5\u7ebf\u4e5f\u662f\u4e00\u6837\u7684\uff0c\u53ea\u662f\u6211\u4e70\u7684\u662f 168P \u7248\u672c\u7684\uff0c\u8fd9\u4e2a MCU \u8fd8\u8981\u518d\u9009\u62e9\u4e00\u4e0b\u3002<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1693036308775.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 554px; --smush-placeholder-aspect-ratio: 554\/159;\" \/><\/p>\n<p>\u4e13\u95e8\u5f53\u6e29\u6e7f\u5ea6\u8ba1\u4f7f\u7528\u8fd8\u633a\u4e0d\u9519\u7684<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1693038258734.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 675px; --smush-placeholder-aspect-ratio: 675\/900;\" \/><\/p>\n<h1><span class=\"ez-toc-section\" id=\"%E6%A0%91%E8%8E%93%E6%B4%BE\"><\/span>\u6811\u8393\u6d3e<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u8fd9\u91cc\u4f7f\u7528\u7684\u662f\uff1a<br \/>\n\u6811\u8393\u6d3e cm4\uff08\u5b98\u65b9\u7cfb\u7edf arm64 2023.5.3)<br \/>\nAdafruit-sht31-for-PI\uff08\u5e93\u548c\u793a\u4f8b\u4ee3\u7801\uff09\uff1a<a href=\"https:\/\/github.com\/sfeakes\/Adafruit-sht31-for-PI\">https:\/\/github.com\/sfeakes\/Adafruit-sht31-for-PI<\/a><\/p>\n<p>\u4f7f\u7528\u6f14\u793a<\/p>\n<pre><code class=\"language-bash\"># \u5b89\u88c5\u4f9d\u8d56\nsudo apt update\nsudo apt install -y build-essential git\n\n# \u514b\u9686 Adafruit-sht31-for-PI \u9879\u76ee\ngit clone https:\/\/github.com\/sfeakes\/Adafruit-sht31-for-PI.git --depth=1\n\n# \u7f16\u8bd1\ncd Adafruit-sht31-for-PI &amp;&amp; make\n\n# \u8fd0\u884c\n.\/sht31-d &lt;\u53c2\u6570&gt;\n# s \u6253\u5370\u72b6\u6001\n# r \u8f6f\u590d\u4f4d\n# c \u6e05\u9664\u72b6\u6001\n# e \u542f\u7528\u52a0\u70ed\u5668\n# d \u7981\u7528\u52a0\u70ed\u5668\n# n \u6253\u5370\u5e8f\u5217\n# p \u6253\u5370\u6e29\u5ea6\u548c\u6e7f\u5ea6\n# -h \u5e2e\u52a9<\/code><\/pre>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/08\/image-1691907335984.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 302px; --smush-placeholder-aspect-ratio: 302\/209;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u4e4b\u524d\u7528\u8fc7 DHT11 \u6e29\u6e7f\u5ea6\u4f20\u611f\u5668\uff0c\u6d4b\u91cf\u8303\u56f4\u548c\u7cbe\u5ea6\u90fd\u6bd4\u8f83\u6709\u9650\uff0c\u8fd9\u6b21\u8bd5\u4e86\u4e00\u4e0b SHT30\uff0c\u5c31\u597d\u5f88\u591a\uff0c\u5c31\u662f\u4ef7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[1],"tags":[],"class_list":["post-10866","post","type-post","status-publish","format-standard","hentry","category-all"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/10866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10866"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/10866\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}