{"id":76675,"date":"2026-02-23T00:26:07","date_gmt":"2026-02-22T16:26:07","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/76675.html"},"modified":"2026-02-23T00:26:07","modified_gmt":"2026-02-22T16:26:07","slug":"%e8%93%9d%e6%a1%a5%e6%9d%af%e5%8d%95%e7%89%87%e6%9c%ba%e8%b5%9b%e9%a2%98%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90%ef%bc%9a%e4%bb%8e%e5%ba%95%e5%b1%82%e9%a9%b1%e5%8a%a8%e5%88%b0%e7%b3%bb%e7%bb%9f%e6%95%b4","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/76675.html","title":{"rendered":"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8"},"content":{"rendered":"<h3>1. \u8d5b\u9898\u7279\u70b9\u4e0e\u65f6\u95f4\u5206\u914d\u7b56\u7565<\/h3>\n<p>\u4eca\u5e74\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9879\u7684\u9898\u76ee\u7ed9\u6211\u7684\u7b2c\u4e00\u611f\u89c9\u662f\u9898\u91cf\u5de8\u5927&#xff0c;\u6a21\u5757\u7e41\u591a\u3002\u867d\u7136\u5355\u4e2a\u6a21\u5757\u7684\u96be\u5ea6\u4e0d\u7b97\u7279\u522b\u9ad8&#xff0c;\u4f46\u8981\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u6240\u6709\u6a21\u5757\u7684\u6574\u5408\u786e\u5b9e\u662f\u4e2a\u6311\u6218\u3002\u9898\u76ee\u6db5\u76d6\u4e86\u77e9\u9635\u6309\u952e\u3001\u6570\u7801\u7ba1\u663e\u793a\u3001\u7ee7\u7535\u5668\u63a7\u5236\u3001LED\u6307\u793a\u706f\u3001DS1302\u65f6\u949f\u6a21\u5757\u3001DS18B20\u6e29\u5ea6\u4f20\u611f\u5668\u3001ADC\u6a21\u6570\u8f6c\u6362\u3001\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u3001NE555\u9891\u7387\u68c0\u6d4b\u4ee5\u53ca\u4e32\u53e3\u901a\u4fe1\u7b49\u5341\u591a\u4e2a\u6a21\u5757\u3002\u9762\u5bf9\u8fd9\u6837\u7684\u9898\u91cf&#xff0c;\u4f20\u7edf\u7684\u4e00\u6b65\u6b65\u4ece\u5e95\u5c42\u5199\u5230\u4e0a\u5c42\u7684\u65b9\u6cd5\u663e\u7136\u4e0d\u591f\u7528\u4e86\u3002<\/p>\n<p>\u62118:30\u8fdb\u5165\u8d5b\u573a\u540e&#xff0c;\u524d20\u591a\u5206\u949f\u5148\u6572\u4e86\u6570\u7801\u7ba1\u3001\u6309\u952e\u3001\u7ee7\u7535\u5668\u548cLED\u7684\u57fa\u7840\u9a71\u52a8\u4ee3\u7801\u3002\u8fd9\u662f\u6bd4\u8f83\u7a33\u59a5\u7684\u505a\u6cd5&#xff0c;\u56e0\u4e3a\u8fd9\u4e9b\u6a21\u5757\u662f\u5927\u591a\u6570\u529f\u80fd\u7684\u57fa\u7840\u3002\u4f46\u56de\u8fc7\u5934\u6765\u770b&#xff0c;\u53ef\u80fd\u66f4\u597d\u7684\u7b56\u7565\u662f\u5148\u5feb\u901f\u6d4f\u89c8\u6240\u6709\u9898\u76ee\u8981\u6c42&#xff0c;\u8bc6\u522b\u51fa\u6838\u5fc3\u5f97\u5206\u70b9\u518d\u51b3\u5b9a\u7f16\u7801\u987a\u5e8f\u30029:00\u5f00\u59cb\u6b63\u5f0f\u89e3\u6790\u8d5b\u9898\u65f6&#xff0c;\u786e\u5b9e\u88ab\u9898\u91cf\u5413\u4e86\u4e00\u8df3&#xff0c;\u5404\u79cd\u529f\u80fd\u8981\u6c42\u4ea4\u7ec7\u5728\u4e00\u8d77&#xff0c;\u9700\u8981\u5f88\u597d\u7684\u7cfb\u7edf\u601d\u7ef4\u624d\u80fd\u7406\u6e05\u5934\u7eea\u3002<\/p>\n<p>\u523011:00\u5de6\u53f3&#xff0c;\u6211\u57fa\u672c\u5b8c\u6210\u4e86\u6240\u6709\u6a21\u5757\u7684\u5e95\u5c42\u9a71\u52a8\u7f16\u5199&#xff0c;\u4f46\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u4e86\u4e24\u4e2a\u6bd4\u8f83\u81f4\u547d\u7684\u5931\u8bef&#xff1a;DS1302\u7684\u5199\u4fdd\u62a4\u8bbe\u7f6e\u9519\u8bef\u803d\u8bef\u4e8610\u5206\u949f&#xff0c;\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u4f18\u5148\u7ea7\u95ee\u9898\u66f4\u662f\u6d6a\u8d39\u4e8620\u591a\u5206\u949f\u3002\u8fd9\u4e9b\u65f6\u95f4\u5728\u6bd4\u8d5b\u4e2d\u6781\u5176\u5b9d\u8d35&#xff0c;\u6bcf\u4e2a\u5c0f\u9519\u8bef\u90fd\u53ef\u80fd\u5f71\u54cd\u6700\u7ec8\u5b8c\u6210\u5ea6\u3002\u5efa\u8bae\u540e\u7eed\u53c2\u8d5b\u8005\u4e00\u5b9a\u8981\u5bf9\u6bcf\u4e2a\u6a21\u5757\u7684\u5e38\u89c1\u5751\u70b9\u63d0\u524d\u719f\u6089&#xff0c;\u6bd4\u5982DS1302\u7684\u5199\u4fdd\u62a4\u4f4d\u3001\u8d85\u58f0\u6ce2\u6d4b\u91cf\u65f6\u7684\u4e2d\u65ad\u4f18\u5148\u7ea7\u5904\u7406\u7b49&#xff0c;\u6700\u597d\u5728\u8d5b\u524d\u5c31\u51c6\u5907\u597d\u7ecf\u8fc7\u9a8c\u8bc1\u7684\u9a71\u52a8\u4ee3\u7801\u3002<\/p>\n<h3>2. \u5e38\u89c1\u6a21\u5757\u7684\u9a71\u52a8\u5f00\u53d1\u4e0e\u8c03\u8bd5\u6280\u5de7<\/h3>\n<h4>2.1 \u77e9\u9635\u6309\u952e\u7684\u7a33\u5b9a\u8bfb\u53d6\u65b9\u6848<\/h4>\n<p>\u77e9\u9635\u6309\u952e\u5728\u5386\u5c4a\u6bd4\u8d5b\u4e2d\u90fd\u662f\u5fc5\u8003\u6a21\u5757&#xff0c;\u4f46\u5f88\u591a\u4eba\u4f1a\u5728\u6309\u952e\u53bb\u6296\u548c\u540c\u65f6\u6309\u952e\u5904\u7406\u4e0a\u683d\u8ddf\u5934\u3002\u6211\u91c7\u7528\u7684\u65b9\u6848\u662f\u884c\u5217\u626b\u63cf\u52a0\u72b6\u6001\u673a\u7684\u65b9\u5f0f&#xff0c;\u5b9e\u9645\u6d4b\u8bd5\u4e0b\u6765\u7a33\u5b9a\u6027\u5f88\u597d\u3002\u5173\u952e\u662f\u8981\u8bbe\u7f6e\u5408\u9002\u7684\u53bb\u6296\u65f6\u95f4&#xff0c;\u4e00\u822c20ms\u5de6\u53f3\u6bd4\u8f83\u5408\u9002\u3002\u8fd9\u91cc\u5206\u4eab\u4e00\u4e2a\u6211\u5b9e\u6d4b\u6709\u6548\u7684\u4ee3\u7801\u7247\u6bb5&#xff1a;<\/p>\n<p>\/\/ \u77e9\u9635\u6309\u952e\u626b\u63cf\u51fd\u6570<br \/>\nuint8_t KeyScan(void)<br \/>\n{<br \/>\n    static uint8_t key_state &#061; 0;<br \/>\n    uint8_t key_press &#061; 0;<\/p>\n<p>    \/\/ \u884c\u5217\u626b\u63cf\u4ee3\u7801<br \/>\n    \/\/ &#8230;<\/p>\n<p>    if(key_press) {<br \/>\n        if(key_state &#061;&#061; 0) {<br \/>\n            delay_ms(20); \/\/ \u53bb\u6296\u5ef6\u65f6<br \/>\n            key_state &#061; 1;<br \/>\n            return key_press;<br \/>\n        }<br \/>\n    } else {<br \/>\n        key_state &#061; 0;<br \/>\n    }<br \/>\n    return 0;<br \/>\n}<\/p>\n<p>\u8fd9\u4e2a\u65b9\u6848\u7684\u597d\u5904\u662f\u65e2\u80fd\u53ef\u9760\u53bb\u6296&#xff0c;\u53c8\u4e0d\u4f1a\u963b\u585e\u5176\u4ed6\u4efb\u52a1\u7684\u6267\u884c\u3002\u5728\u5b9e\u9645\u6bd4\u8d5b\u4e2d&#xff0c;\u8fd8\u8981\u8003\u8651\u591a\u4e2a\u6309\u952e\u540c\u65f6\u6309\u4e0b\u7684\u60c5\u51b5&#xff0c;\u901a\u5e38\u91c7\u7528\u4f18\u5148\u7ea7\u7b56\u7565\u6216\u8005\u6700\u540e\u6309\u952e\u4f18\u5148\u7684\u89c4\u5219\u3002<\/p>\n<h4>2.2 \u6570\u7801\u7ba1\u663e\u793a\u7684\u6297\u5e72\u6270\u8bbe\u8ba1<\/h4>\n<p>\u6570\u7801\u7ba1\u663e\u793a\u770b\u4f3c\u7b80\u5355&#xff0c;\u4f46\u5728\u591a\u6a21\u5757\u7cfb\u7edf\u4e2d\u5f88\u5bb9\u6613\u51fa\u73b0\u95ea\u70c1\u3001\u6b8b\u5f71\u7b49\u95ee\u9898\u3002\u7279\u522b\u662f\u5f53\u7cfb\u7edf\u4e2d\u6709\u8d85\u58f0\u6ce2\u3001DS18B20\u7b49\u9700\u8981\u957f\u65f6\u95f4\u64cd\u4f5c\u7684\u6a21\u5757\u65f6&#xff0c;\u6570\u7801\u7ba1\u7684\u5237\u65b0\u5f80\u5f80\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u6211\u91c7\u7528\u7684\u89e3\u51b3\u65b9\u6848\u662f\u4f7f\u7528\u5b9a\u65f6\u5668\u4e2d\u65ad\u8fdb\u884c\u5237\u65b0&#xff0c;\u5b8c\u5168\u72ec\u7acb\u4e8e\u4e3b\u5faa\u73af&#xff1a;<\/p>\n<p>\/\/ \u5b9a\u65f6\u5668\u4e2d\u65ad\u670d\u52a1\u51fd\u6570<br \/>\nvoid Timer0_ISR() interrupt 1<br \/>\n{<br \/>\n    static uint8_t pos &#061; 0;<\/p>\n<p>    \/\/ \u5173\u95ed\u6240\u6709\u4f4d\u9009<br \/>\n    P2 &#061; (P2 &amp; 0x1F) | 0xE0;<\/p>\n<p>    \/\/ \u8bbe\u7f6e\u6bb5\u9009\u6570\u636e<br \/>\n    P0 &#061; digit[display_buf[pos]];<\/p>\n<p>    \/\/ \u6253\u5f00\u5bf9\u5e94\u4f4d\u9009<br \/>\n    P2 &#061; (P2 &amp; 0x1F) | (0x80 &gt;&gt; pos);<\/p>\n<p>    pos &#061; (pos &#043; 1) % 6;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u786e\u4fdd\u4e86\u5373\u4f7f\u4e3b\u5faa\u73af\u56e0\u4e3a\u5176\u4ed6\u6a21\u5757\u7684\u963b\u585e\u64cd\u4f5c\u800c\u5ef6\u8fdf&#xff0c;\u6570\u7801\u7ba1\u663e\u793a\u4e5f\u80fd\u4fdd\u6301\u7a33\u5b9a\u5237\u65b0\u3002\u5b9e\u9645\u5e94\u7528\u4e2d\u8fd8\u9700\u8981\u6839\u636e\u6570\u7801\u7ba1\u7684\u6570\u91cf\u8c03\u6574\u5237\u65b0\u9891\u7387&#xff0c;\u4e00\u822c\u4fdd\u6301\u572850Hz\u4ee5\u4e0a\u5c31\u80fd\u907f\u514d\u8089\u773c\u53ef\u89c1\u7684\u95ea\u70c1\u3002<\/p>\n<h4>2.3 DS18B20\u6e29\u5ea6\u4f20\u611f\u5668\u7684\u7cbe\u786e\u8bfb\u53d6<\/h4>\n<p>DS18B20\u662f\u5355\u603b\u7ebf\u5668\u4ef6&#xff0c;\u65f6\u5e8f\u8981\u6c42\u4e25\u683c&#xff0c;\u5f88\u5bb9\u6613\u56e0\u4e2d\u65ad\u5e72\u6270\u5bfc\u81f4\u8bfb\u53d6\u5931\u8d25\u3002\u6211\u5728\u6bd4\u8d5b\u4e2d\u5c31\u9047\u5230\u4e86\u6e29\u5ea6\u8bfb\u53d6\u5076\u5c14\u5f02\u5e38\u7684\u95ee\u9898&#xff0c;\u540e\u6765\u53d1\u73b0\u662f\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u4e2d\u65ad\u5f71\u54cd\u4e86DS18B20\u7684\u65f6\u5e8f\u3002\u89e3\u51b3\u65b9\u6848\u662f\u5728\u8bfb\u53d6\u6e29\u5ea6\u65f6\u4e34\u65f6\u5173\u95ed\u76f8\u5173\u4e2d\u65ad&#xff1a;<\/p>\n<p>float Read_Temperature(void)<br \/>\n{<br \/>\n    float temp;<br \/>\n    EA &#061; 0; \/\/ \u5173\u95ed\u603b\u4e2d\u65ad<br \/>\n    DS18B20_Convert(); \/\/ \u542f\u52a8\u8f6c\u6362<br \/>\n    delay_ms(750);    \/\/ \u7b49\u5f85\u8f6c\u6362\u5b8c\u6210<br \/>\n    temp &#061; DS18B20_ReadTemp(); \/\/ \u8bfb\u53d6\u6e29\u5ea6<br \/>\n    EA &#061; 1; \/\/ \u91cd\u65b0\u5f00\u542f\u4e2d\u65ad<br \/>\n    return temp;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u867d\u7136\u7b80\u5355\u7c97\u66b4&#xff0c;\u4f46\u786e\u5b9e\u6709\u6548\u3002\u66f4\u597d\u7684\u505a\u6cd5\u662f\u4f7f\u7528\u72b6\u6001\u673a\u975e\u963b\u585e\u65b9\u5f0f\u8bfb\u53d6&#xff0c;\u4f46\u8003\u8651\u5230\u6bd4\u8d5b\u65f6\u95f4\u7d27\u5f20&#xff0c;\u76f4\u63a5\u5173\u4e2d\u65ad\u53cd\u800c\u66f4\u53ef\u9760\u3002<\/p>\n<h3>3. \u591a\u6a21\u5757\u6574\u5408\u4e2d\u7684\u4f18\u5148\u7ea7\u5904\u7406<\/h3>\n<h4>3.1 \u4e2d\u65ad\u4f18\u5148\u7ea7\u7684\u5408\u7406\u914d\u7f6e<\/h4>\n<p>\u5728\u591a\u6a21\u5757\u7cfb\u7edf\u4e2d&#xff0c;\u4e2d\u65ad\u4f18\u5148\u7ea7\u7684\u914d\u7f6e\u81f3\u5173\u91cd\u8981\u3002\u4ee5\u8d85\u58f0\u6ce2\u6a21\u5757\u4e3a\u4f8b&#xff0c;\u5b83\u901a\u5e38\u4f7f\u7528\u5916\u90e8\u4e2d\u65ad\u6765\u68c0\u6d4b\u56de\u6ce2\u4fe1\u53f7&#xff0c;\u5982\u679c\u4f18\u5148\u7ea7\u8bbe\u7f6e\u4e0d\u5f53&#xff0c;\u5f88\u5bb9\u6613\u88ab\u5176\u4ed6\u4e2d\u65ad\u6253\u65ad\u5bfc\u81f4\u6d4b\u8ddd\u5931\u8d25\u3002\u5728\u6211\u7684\u5b9e\u73b0\u4e2d&#xff0c;\u5c06\u8d85\u58f0\u6ce2\u7684\u4e2d\u65ad\u4f18\u5148\u7ea7\u8bbe\u7f6e\u4e3a\u6700\u9ad8&#xff1a;<\/p>\n<p>void Interrupt_Priority_Init()<br \/>\n{<br \/>\n    \/\/ \u8bbe\u7f6e\u8d85\u58f0\u6ce2\u5916\u90e8\u4e2d\u65ad\u4e3a\u6700\u9ad8\u4f18\u5148\u7ea7<br \/>\n    PX0 &#061; 1;<\/p>\n<p>    \/\/ \u5b9a\u65f6\u5668\u4e2d\u65ad\u4f18\u5148\u7ea7\u6b21\u4e4b<br \/>\n    PT0 &#061; 0;<br \/>\n    PT1 &#061; 0;<\/p>\n<p>    \/\/ \u4e32\u53e3\u4e2d\u65ad\u4f18\u5148\u7ea7\u6700\u4f4e<br \/>\n    PS &#061; 0;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u914d\u7f6e\u786e\u4fdd\u4e86\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u51c6\u786e\u6027&#xff0c;\u56e0\u4e3a\u56de\u6ce2\u65f6\u95f4\u6d4b\u91cf\u5bf9\u65f6\u5e8f\u8981\u6c42\u6781\u5176\u4e25\u683c&#xff0c;\u5373\u4f7f\u5fae\u5c0f\u7684\u4e2d\u65ad\u5ef6\u8fdf\u4e5f\u4f1a\u5bfc\u81f4\u5398\u7c73\u7ea7\u7684\u8bef\u5dee\u3002\u5b9e\u9645\u6d4b\u8bd5\u4e2d&#xff0c;\u5408\u7406\u7684\u4f18\u5148\u7ea7\u914d\u7f6e\u80fd\u8ba9\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u7a33\u5b9a\u6027\u63d0\u534750%\u4ee5\u4e0a\u3002<\/p>\n<h4>3.2 \u65f6\u95f4\u654f\u611f\u4efb\u52a1\u7684\u5904\u7406\u7b56\u7565<\/h4>\n<p>\u6bd4\u8d5b\u4e2d\u6709\u4e9b\u4efb\u52a1\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u5f88\u9ad8&#xff0c;\u6bd4\u5982NE555\u9891\u7387\u6d4b\u91cf\u3001\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7b49&#xff0c;\u800c\u6709\u4e9b\u4efb\u52a1\u5219\u53ef\u4ee5\u9002\u5f53\u5ef6\u8fdf&#xff0c;\u5982\u6e29\u5ea6\u8bfb\u53d6\u3001\u6309\u952e\u626b\u63cf\u7b49\u3002\u6211\u91c7\u7528\u7684\u5206\u5c42\u5904\u7406\u7b56\u7565\u662f&#xff1a;\u5c06\u65f6\u95f4\u654f\u611f\u4efb\u52a1\u653e\u5728\u4e2d\u65ad\u670d\u52a1\u51fd\u6570\u4e2d\u6267\u884c&#xff0c;\u6216\u8005\u4f7f\u7528\u9ad8\u4f18\u5148\u7ea7\u5b9a\u65f6\u5668\u8fdb\u884c\u8c03\u5ea6&#xff1b;\u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u4e0d\u9ad8\u7684\u4efb\u52a1\u5219\u653e\u5728\u4e3b\u5faa\u73af\u4e2d\u6309\u9700\u6267\u884c\u3002<\/p>\n<p>\u6bd4\u5982\u8d85\u58f0\u6ce2\u6d4b\u8ddd&#xff0c;\u6211\u4f7f\u7528\u5b9a\u65f6\u5668\u6355\u83b7\u529f\u80fd\u6765\u7cbe\u786e\u6d4b\u91cf\u56de\u6ce2\u65f6\u95f4&#xff0c;\u5b8c\u5168\u5728\u4e2d\u65ad\u4e2d\u5b8c\u6210\u8ddd\u79bb\u8ba1\u7b97&#xff0c;\u4e3b\u7a0b\u5e8f\u53ea\u9700\u8981\u8bfb\u53d6\u7ed3\u679c\u5373\u53ef\u3002\u8fd9\u6837\u5373\u4f7f\u4e3b\u5faa\u73af\u56e0\u4e3a\u5176\u4ed6\u4efb\u52a1\u800c\u963b\u585e&#xff0c;\u4e5f\u4e0d\u4f1a\u5f71\u54cd\u6d4b\u8ddd\u7684\u51c6\u786e\u6027\u3002<\/p>\n<h3>4. \u7cfb\u7edf\u67b6\u6784\u8bbe\u8ba1\u4e0e\u529f\u80fd\u6574\u5408<\/h3>\n<h4>4.1 \u72b6\u6001\u673a\u67b6\u6784\u7684\u5e94\u7528<\/h4>\n<p>\u9762\u5bf9\u591a\u529f\u80fd\u3001\u591a\u754c\u9762\u7684\u6bd4\u8d5b\u8981\u6c42&#xff0c;\u72b6\u6001\u673a\u67b6\u6784\u662f\u6700\u5408\u9002\u7684\u9009\u62e9\u3002\u6211\u5c06\u6574\u4e2a\u7cfb\u7edf\u5212\u5206\u4e3a\u51e0\u4e2a\u4e3b\u8981\u72b6\u6001&#xff1a;\u53c2\u6570\u8bbe\u7f6e\u72b6\u6001\u3001\u6d4b\u91cf\u72b6\u6001\u3001\u663e\u793a\u72b6\u6001\u3001\u901a\u4fe1\u72b6\u6001\u7b49\u3002\u6bcf\u4e2a\u72b6\u6001\u4e0b\u53c8\u5305\u542b\u82e5\u5e72\u5b50\u72b6\u6001&#xff0c;\u4f7f\u7528\u5168\u5c40\u53d8\u91cf\u6765\u8ddf\u8e2a\u5f53\u524d\u72b6\u6001\u3002<\/p>\n<p>typedef enum {<br \/>\n    STATE_MEASURE,<br \/>\n    STATE_SETTINGS,<br \/>\n    STATE_CALIBRATE,<br \/>\n    STATE_COMM<br \/>\n} SystemState;<\/p>\n<p>SystemState current_state &#061; STATE_MEASURE;<\/p>\n<p>void Main_Loop()<br \/>\n{<br \/>\n    switch(current_state) {<br \/>\n        case STATE_MEASURE:<br \/>\n            Measure_State_Handler();<br \/>\n            break;<br \/>\n        case STATE_SETTINGS:<br \/>\n            Settings_State_Handler();<br \/>\n            break;<br \/>\n        \/\/ \u5176\u4ed6\u72b6\u6001\u5904\u7406<br \/>\n    }<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u67b6\u6784\u4f7f\u7a0b\u5e8f\u7ed3\u6784\u6e05\u6670&#xff0c;\u4fbf\u4e8e\u8c03\u8bd5\u548c\u529f\u80fd\u6269\u5c55\u3002\u5f53\u9700\u8981\u6dfb\u52a0\u65b0\u529f\u80fd\u65f6&#xff0c;\u53ea\u9700\u8981\u589e\u52a0\u76f8\u5e94\u7684\u72b6\u6001\u548c\u5904\u7406\u51fd\u6570\u5373\u53ef&#xff0c;\u4e0d\u4f1a\u5f71\u54cd\u73b0\u6709\u4ee3\u7801\u3002<\/p>\n<h4>4.2 \u6570\u636e\u6d41\u4e0e\u6a21\u5757\u95f4\u901a\u4fe1<\/h4>\n<p>\u5404\u6a21\u5757\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u9012\u9700\u8981\u8bbe\u8ba1\u826f\u597d\u7684\u63a5\u53e3\u3002\u6211\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5168\u5c40\u7684\u6570\u636e\u7ed3\u6784\u6765\u5b58\u50a8\u6240\u6709\u4f20\u611f\u5668\u6570\u636e\u548c\u5904\u7406\u7ed3\u679c&#xff1a;<\/p>\n<p>typedef struct {<br \/>\n    float temperature;     \/\/ \u6e29\u5ea6\u503c<br \/>\n    uint16_t distance;     \/\/ \u8ddd\u79bb\u503c<br \/>\n    uint16_t adc_value;    \/\/ ADC\u91c7\u6837\u503c<br \/>\n    uint32_t frequency;    \/\/ NE555\u9891\u7387\u503c<br \/>\n    \/\/ \u5176\u4ed6\u6570\u636e\u5b57\u6bb5&#8230;<br \/>\n} SensorData;<\/p>\n<p>SensorData sensor_data;<\/p>\n<p>\u6bcf\u4e2a\u6a21\u5757\u901a\u8fc7\u7edf\u4e00\u7684\u63a5\u53e3\u8bfb\u5199\u8fd9\u4e2a\u7ed3\u6784\u4f53&#xff0c;\u907f\u514d\u4e86\u590d\u6742\u7684\u53c2\u6570\u4f20\u9012\u548c\u5168\u5c40\u53d8\u91cf\u6ee5\u7528\u3002\u540c\u65f6\u4f7f\u7528\u4e92\u65a5\u6807\u5fd7\u6765\u786e\u4fdd\u6570\u636e\u4e00\u81f4\u6027&#xff0c;\u6bd4\u5982\u5f53\u8d85\u58f0\u6ce2\u6a21\u5757\u6b63\u5728\u66f4\u65b0\u8ddd\u79bb\u6570\u636e\u65f6&#xff0c;\u663e\u793a\u6a21\u5757\u4f1a\u7b49\u5f85\u66f4\u65b0\u5b8c\u6210\u540e\u518d\u8bfb\u53d6\u3002<\/p>\n<h3>5. \u5e38\u89c1\u5931\u8bef\u5206\u6790\u4e0e\u907f\u514d\u65b9\u6cd5<\/h3>\n<h4>5.1 DS1302\u5199\u4fdd\u62a4\u95ee\u9898<\/h4>\n<p>DS1302\u65f6\u949f\u82af\u7247\u7684\u5199\u4fdd\u62a4\u529f\u80fd\u662f\u4e2a\u5e38\u89c1\u7684\u5751\u70b9\u3002\u5728\u5199\u5165\u65f6\u95f4\u6570\u636e\u524d&#xff0c;\u5fc5\u987b\u5148\u5173\u95ed\u5199\u4fdd\u62a4&#xff0c;\u5199\u5b8c\u540e\u518d\u91cd\u65b0\u5f00\u542f\u3002\u6211\u4e00\u5f00\u59cb\u5c31\u5fd8\u4e86\u5173\u95ed\u5199\u4fdd\u62a4&#xff0c;\u5bfc\u81f4\u65f6\u95f4\u8bbe\u7f6e\u5931\u8d25&#xff1a;<\/p>\n<p>void DS1302_WriteTime(TimeTypeDef *time)<br \/>\n{<br \/>\n    \/\/ \u5173\u95ed\u5199\u4fdd\u62a4<br \/>\n    DS1302_WriteByte(0x8E, 0x00);<\/p>\n<p>    \/\/ \u5199\u5165\u65f6\u95f4\u6570\u636e<br \/>\n    DS1302_WriteByte(0x80, time-&gt;second);<br \/>\n    DS1302_WriteByte(0x82, time-&gt;minute);<br \/>\n    \/\/ \u5176\u4ed6\u65f6\u95f4\u5b57\u6bb5&#8230;<\/p>\n<p>    \/\/ \u91cd\u65b0\u5f00\u542f\u5199\u4fdd\u62a4<br \/>\n    DS1302_WriteByte(0x8E, 0x80);<br \/>\n}<\/p>\n<p>\u8fd9\u4e2a\u770b\u4f3c\u7b80\u5355\u7684\u6b65\u9aa4\u5374\u5f88\u5bb9\u6613\u88ab\u5ffd\u7565&#xff0c;\u5efa\u8bae\u5728\u5199\u65f6\u95f4\u6570\u636e\u7684\u51fd\u6570\u4e2d\u76f4\u63a5\u5305\u542b\u5199\u4fdd\u62a4\u7684\u5904\u7406&#xff0c;\u907f\u514d\u9057\u5fd8\u3002<\/p>\n<h4>5.2 \u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u4f18\u5148\u7ea7\u51b2\u7a81<\/h4>\n<p>\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u5931\u8d25\u5f88\u591a\u65f6\u5019\u662f\u56e0\u4e3a\u4e2d\u65ad\u4f18\u5148\u7ea7\u914d\u7f6e\u4e0d\u5f53\u3002\u5f53\u8d85\u58f0\u6ce2\u6b63\u5728\u6d4b\u91cf\u8ddd\u79bb\u65f6&#xff0c;\u5982\u679c\u88ab\u5176\u4ed6\u4e2d\u65ad&#xff08;\u7279\u522b\u662f\u957f\u65f6\u95f4\u7684\u4e2d\u65ad\u5982DS18B20\u8bfb\u53d6&#xff09;\u6253\u65ad&#xff0c;\u5c31\u4f1a\u5bfc\u81f4\u6d4b\u91cf\u9519\u8bef\u3002\u6211\u7684\u89e3\u51b3\u65b9\u6848\u662f&#xff1a;<\/p>\n<p>\u7b2c\u4e00&#xff0c;\u5c06\u8d85\u58f0\u6ce2\u76f8\u5173\u7684\u4e2d\u65ad\u8bbe\u7f6e\u4e3a\u6700\u9ad8\u4f18\u5148\u7ea7&#xff0c;\u786e\u4fdd\u4e0d\u4f1a\u88ab\u5176\u4ed6\u4e2d\u65ad\u6253\u65ad\u3002<\/p>\n<p>\u7b2c\u4e8c&#xff0c;\u5728\u8d85\u58f0\u6ce2\u6d4b\u91cf\u671f\u95f4\u4e34\u65f6\u5173\u95ed\u53ef\u80fd\u9020\u6210\u5e72\u6270\u7684\u4e2d\u65ad&#xff1a;<\/p>\n<p>uint16_t Ultrasonic_Measure(void)<br \/>\n{<br \/>\n    uint16_t distance;<br \/>\n    ET0 &#061; 0; \/\/ \u5173\u95ed\u5b9a\u65f6\u56680\u4e2d\u65ad<br \/>\n    ET1 &#061; 0; \/\/ \u5173\u95ed\u5b9a\u65f6\u56681\u4e2d\u65ad<\/p>\n<p>    \/\/ \u6267\u884c\u8d85\u58f0\u6ce2\u6d4b\u8ddd<br \/>\n    \/\/ &#8230;<\/p>\n<p>    ET0 &#061; 1; \/\/ \u91cd\u65b0\u5f00\u542f\u4e2d\u65ad<br \/>\n    ET1 &#061; 1;<br \/>\n    return distance;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u867d\u7136\u4f1a\u5f71\u54cd\u5176\u4ed6\u4efb\u52a1\u7684\u5b9e\u65f6\u6027&#xff0c;\u4f46\u786e\u4fdd\u4e86\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u7684\u51c6\u786e\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8c03\u6574\u3002<\/p>\n<h4>5.3 \u4e32\u53e3\u901a\u4fe1\u7684\u6570\u636e\u5904\u7406<\/h4>\n<p>\u4e32\u53e3\u901a\u4fe1\u662f\u6bd4\u8d5b\u4e2d\u91cd\u8981\u7684\u5f97\u5206\u70b9&#xff0c;\u4f46\u5f80\u5f80\u56e0\u4e3a\u65f6\u95f4\u4e0d\u591f\u800c\u88ab\u5ffd\u7565\u3002\u6211\u5efa\u8bae\u4f18\u5148\u5b9e\u73b0\u4e32\u53e3\u57fa\u7840\u529f\u80fd&#xff0c;\u5373\u4f7f\u4e0d\u80fd\u5b8c\u5168\u5b9e\u73b0\u6240\u6709\u8981\u6c42&#xff0c;\u4e5f\u8981\u4fdd\u8bc1\u57fa\u672c\u7684\u6570\u636e\u6536\u53d1\u6b63\u5e38\u3002<\/p>\n<p>\u4e32\u53e3\u6570\u636e\u5904\u7406\u4e2d\u5bb9\u6613\u51fa\u95ee\u9898\u7684\u5730\u65b9\u662f\u6570\u636e\u63a5\u6536\u7f13\u51b2\u533a\u7684\u7ba1\u7406\u3002\u6211\u4f7f\u7528\u73af\u5f62\u7f13\u51b2\u533a\u6765\u5b58\u50a8\u63a5\u6536\u5230\u7684\u6570\u636e&#xff1a;<\/p>\n<p>#define UART_BUF_SIZE 64<\/p>\n<p>typedef struct {<br \/>\n    uint8_t buffer[UART_BUF_SIZE];<br \/>\n    uint8_t head;<br \/>\n    uint8_t tail;<br \/>\n} RingBuffer;<\/p>\n<p>RingBuffer uart_rx_buf;<\/p>\n<p>void UART_ISR() interrupt 4<br \/>\n{<br \/>\n    if(RI) {<br \/>\n        RI &#061; 0;<br \/>\n        uart_rx_buf.buffer[uart_rx_buf.head] &#061; SBUF;<br \/>\n        uart_rx_buf.head &#061; (uart_rx_buf.head &#043; 1) % UART_BUF_SIZE;<br \/>\n    }<br \/>\n    \/\/ \u53d1\u9001\u5904\u7406&#8230;<br \/>\n}<\/p>\n<p>\u8fd9\u79cd\u7ed3\u6784\u907f\u514d\u4e86\u6570\u636e\u4e22\u5931\u548c\u8986\u76d6\u95ee\u9898&#xff0c;\u786e\u4fdd\u5373\u4f7f\u5728\u5904\u7406\u901f\u5ea6\u8ddf\u4e0d\u4e0a\u63a5\u6536\u901f\u5ea6\u65f6\u4e5f\u4e0d\u4f1a\u4e22\u5931\u6570\u636e\u3002<\/p>\n<h3>6. \u5b9e\u6218\u5efa\u8bae\u4e0e\u5907\u8d5b\u7b56\u7565<\/h3>\n<p>\u57fa\u4e8e\u8fd9\u6b21\u6bd4\u8d5b\u7684\u7ecf\u9a8c\u6559\u8bad&#xff0c;\u6211\u603b\u7ed3\u4e86\u51e0\u70b9\u5907\u8d5b\u5efa\u8bae\u3002\u9996\u5148\u8981\u5efa\u7acb\u81ea\u5df1\u7684\u4ee3\u7801\u5e93&#xff0c;\u5c06\u5e38\u7528\u6a21\u5757\u7684\u9a71\u52a8\u4ee3\u7801\u63d0\u524d\u5199\u597d\u5e76\u5145\u5206\u6d4b\u8bd5&#xff0c;\u6bd4\u8d5b\u65f6\u76f4\u63a5\u8c03\u7528\u53ef\u4ee5\u8282\u7701\u5927\u91cf\u65f6\u95f4\u3002\u91cd\u70b9\u51c6\u5907\u77e9\u9635\u6309\u952e\u3001\u6570\u7801\u7ba1\u3001DS1302\u3001DS18B20\u3001\u8d85\u58f0\u6ce2\u7b49\u5e38\u8003\u6a21\u5757&#xff0c;\u6bcf\u4e2a\u6a21\u5757\u90fd\u8981\u51c6\u5907\u7a33\u5b9a\u53ef\u9760\u7684\u9a71\u52a8\u4ee3\u7801\u3002<\/p>\n<p>\u65f6\u95f4\u5206\u914d\u65b9\u9762&#xff0c;\u5efa\u8bae\u524d30\u5206\u949f\u5feb\u901f\u642d\u5efa\u57fa\u7840\u6846\u67b6&#xff0c;\u63a5\u77401\u5c0f\u65f6\u5b8c\u6210\u6838\u5fc3\u6a21\u5757\u7684\u9a71\u52a8\u5f00\u53d1&#xff0c;\u7136\u540e\u75281.5\u5c0f\u65f6\u8fdb\u884c\u7cfb\u7edf\u6574\u5408\u548c\u529f\u80fd\u5b9e\u73b0&#xff0c;\u6700\u540e\u75591\u5c0f\u65f6\u8c03\u8bd5\u548c\u5b8c\u6210\u9644\u52a0\u529f\u80fd\u3002\u4e00\u5b9a\u8981\u4f18\u5148\u5b9e\u73b0\u5f97\u5206\u660e\u786e\u7684\u6a21\u5757&#xff0c;\u5982\u4e32\u53e3\u901a\u4fe1\u3001\u6570\u636e\u8ba1\u7b97\u7b49&#xff0c;\u8fd9\u4e9b\u5f80\u5f80\u662f\u5206\u6570\u5927\u5934\u3002<\/p>\n<p>\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\u8981\u5584\u7528\u65ad\u70b9\u548c\u65e5\u5fd7\u8f93\u51fa&#xff0c;\u7279\u522b\u662f\u4e32\u53e3\u6253\u5370\u8c03\u8bd5\u4fe1\u606f\u5f88\u6709\u7528\u3002\u9047\u5230\u95ee\u9898\u65f6\u4e0d\u8981\u76f2\u76ee\u4fee\u6539&#xff0c;\u5148\u5206\u6790\u53ef\u80fd\u7684\u539f\u56e0&#xff0c;\u6709\u9488\u5bf9\u6027<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u8d5b\u9898\u7279\u70b9\u4e0e\u65f6\u95f4\u5206\u914d\u7b56\u7565<br \/>\n\u4eca\u5e74\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9879\u7684\u9898\u76ee\u7ed9\u6211\u7684\u7b2c\u4e00\u611f\u89c9\u662f\u9898\u91cf\u5de8\u5927&#xff0c;\u6a21\u5757\u7e41\u591a\u3002\u867d\u7136\u5355\u4e2a\u6a21\u5757\u7684\u96be\u5ea6\u4e0d\u7b97\u7279\u522b\u9ad8&#xff0c;\u4f46\u8981\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u6240\u6709\u6a21\u5757\u7684\u6574\u5408\u786e\u5b9e\u662f\u4e2a\u6311\u6218\u3002\u9898\u76ee\u6db5\u76d6\u4e86\u77e9\u9635\u6309\u952e\u3001\u6570\u7801\u7ba1\u663e\u793a\u3001\u7ee7\u7535\u5668\u63a7\u5236\u3001LED\u6307\u793a\u706f\u3001DS1302\u65f6\u949f\u6a21\u5757\u3001DS18B20\u6e29\u5ea6\u4f20\u611f\u5668\u3001ADC\u6a21\u6570\u8f6c\u6362\u3001\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u3001NE555\u9891\u7387\u68c0\u6d4b\u4ee5\u53ca\u4e32\u53e3\u901a\u4fe1\u7b49\u5341\u591a\u4e2a\u6a21\u5757\u3002\u9762\u5bf9\u8fd9\u6837\u7684\u9898\u91cf&#xff0c;\u4f20\u7edf\u7684\u4e00\u6b65\u6b65\u4ece\u5e95\u5c42\u5199\u5230\u4e0a\u5c42\u7684\u65b9\u6cd5\u663e\u7136\u4e0d\u591f\u7528\u4e86\u3002<br \/>\n\u62118:30\u8fdb\u5165\u8d5b\u573a\u540e&amp;#<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7881,8265,270,729],"topic":[],"class_list":["post-76675","post","type-post","status-publish","format-standard","hentry","category-server","tag-7881","tag-8265","tag-270","tag-729"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/76675.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. \u8d5b\u9898\u7279\u70b9\u4e0e\u65f6\u95f4\u5206\u914d\u7b56\u7565 \u4eca\u5e74\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9879\u7684\u9898\u76ee\u7ed9\u6211\u7684\u7b2c\u4e00\u611f\u89c9\u662f\u9898\u91cf\u5de8\u5927&#xff0c;\u6a21\u5757\u7e41\u591a\u3002\u867d\u7136\u5355\u4e2a\u6a21\u5757\u7684\u96be\u5ea6\u4e0d\u7b97\u7279\u522b\u9ad8&#xff0c;\u4f46\u8981\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u6240\u6709\u6a21\u5757\u7684\u6574\u5408\u786e\u5b9e\u662f\u4e2a\u6311\u6218\u3002\u9898\u76ee\u6db5\u76d6\u4e86\u77e9\u9635\u6309\u952e\u3001\u6570\u7801\u7ba1\u663e\u793a\u3001\u7ee7\u7535\u5668\u63a7\u5236\u3001LED\u6307\u793a\u706f\u3001DS1302\u65f6\u949f\u6a21\u5757\u3001DS18B20\u6e29\u5ea6\u4f20\u611f\u5668\u3001ADC\u6a21\u6570\u8f6c\u6362\u3001\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u3001NE555\u9891\u7387\u68c0\u6d4b\u4ee5\u53ca\u4e32\u53e3\u901a\u4fe1\u7b49\u5341\u591a\u4e2a\u6a21\u5757\u3002\u9762\u5bf9\u8fd9\u6837\u7684\u9898\u91cf&#xff0c;\u4f20\u7edf\u7684\u4e00\u6b65\u6b65\u4ece\u5e95\u5c42\u5199\u5230\u4e0a\u5c42\u7684\u65b9\u6cd5\u663e\u7136\u4e0d\u591f\u7528\u4e86\u3002 \u62118:30\u8fdb\u5165\u8d5b\u573a\u540e&amp;#\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/76675.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-22T16:26:07+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/76675.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/76675.html\",\"name\":\"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-22T16:26:07+00:00\",\"dateModified\":\"2026-02-22T16:26:07+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/76675.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/76675.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/76675.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/76675.html","og_locale":"zh_CN","og_type":"article","og_title":"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. \u8d5b\u9898\u7279\u70b9\u4e0e\u65f6\u95f4\u5206\u914d\u7b56\u7565 \u4eca\u5e74\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9879\u7684\u9898\u76ee\u7ed9\u6211\u7684\u7b2c\u4e00\u611f\u89c9\u662f\u9898\u91cf\u5de8\u5927&#xff0c;\u6a21\u5757\u7e41\u591a\u3002\u867d\u7136\u5355\u4e2a\u6a21\u5757\u7684\u96be\u5ea6\u4e0d\u7b97\u7279\u522b\u9ad8&#xff0c;\u4f46\u8981\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5b8c\u6210\u6240\u6709\u6a21\u5757\u7684\u6574\u5408\u786e\u5b9e\u662f\u4e2a\u6311\u6218\u3002\u9898\u76ee\u6db5\u76d6\u4e86\u77e9\u9635\u6309\u952e\u3001\u6570\u7801\u7ba1\u663e\u793a\u3001\u7ee7\u7535\u5668\u63a7\u5236\u3001LED\u6307\u793a\u706f\u3001DS1302\u65f6\u949f\u6a21\u5757\u3001DS18B20\u6e29\u5ea6\u4f20\u611f\u5668\u3001ADC\u6a21\u6570\u8f6c\u6362\u3001\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u3001NE555\u9891\u7387\u68c0\u6d4b\u4ee5\u53ca\u4e32\u53e3\u901a\u4fe1\u7b49\u5341\u591a\u4e2a\u6a21\u5757\u3002\u9762\u5bf9\u8fd9\u6837\u7684\u9898\u91cf&#xff0c;\u4f20\u7edf\u7684\u4e00\u6b65\u6b65\u4ece\u5e95\u5c42\u5199\u5230\u4e0a\u5c42\u7684\u65b9\u6cd5\u663e\u7136\u4e0d\u591f\u7528\u4e86\u3002 \u62118:30\u8fdb\u5165\u8d5b\u573a\u540e&amp;#","og_url":"https:\/\/www.wsisp.com\/helps\/76675.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-22T16:26:07+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/76675.html","url":"https:\/\/www.wsisp.com\/helps\/76675.html","name":"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-22T16:26:07+00:00","dateModified":"2026-02-22T16:26:07+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/76675.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/76675.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/76675.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u84dd\u6865\u676f\u5355\u7247\u673a\u8d5b\u9898\u6df1\u5ea6\u89e3\u6790\uff1a\u4ece\u5e95\u5c42\u9a71\u52a8\u5230\u7cfb\u7edf\u6574\u5408\u7684\u5b9e\u6218\u590d\u76d8"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/76675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=76675"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/76675\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=76675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=76675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=76675"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=76675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}