{"id":692,"date":"2020-08-13T22:39:18","date_gmt":"2020-08-13T14:39:18","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=692"},"modified":"2020-08-13T22:39:18","modified_gmt":"2020-08-13T14:39:18","slug":"arduino-%e4%b8%8e-%e5%9c%9f%e5%a3%a4%e6%b9%bf%e5%ba%a6%e4%bc%a0%e6%84%9f%e5%99%a8-%e6%b5%8b%e9%87%8f%e5%9c%9f%e5%a3%a4%e6%b9%bf%e5%ba%a6%e8%87%aa%e5%8a%a8%e6%b5%87%e6%b0%b4%e6%8f%90%e9%86%92","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=692","title":{"rendered":"Arduino \u4e0e \u571f\u58e4\u6e7f\u5ea6\u4f20\u611f\u5668 \u6d4b\u91cf\u571f\u58e4\u6e7f\u5ea6\u81ea\u52a8\u6d47\u6c34\u63d0\u9192"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190831170752121.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdnimg.cn\/20190904212001314.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2xpbmczeWU=,size_16,color_FFFFFF,t_70\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">&nbsp;<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">\u571f\u58e4\u6e7f\u5ea6\u4f20\u611f\u5668<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdn.net\/20160515154322811\" alt=\"\"\/><\/figure>\n\n\n\n<p>1\uff0c\u4f20\u611f\u5668\u9002\u7528\u4e8e\u571f\u58e4\u7684\u6e7f\u5ea6\u68c0\u6d4b\uff1b<\/p>\n\n\n\n<p>2\uff0c\u6a21\u5757\u4e2d\u84dd\u8272\u7684\u7535\u4f4d\u5668\u662f\u7528\u4e8e\u571f\u58e4\u6e7f\u5ea6\u7684\u9600\u503c\u8c03\u8282\uff0c<\/p>\n\n\n\n<p>\u987a\u65f6\u9488\u8c03\u8282\uff0c\u63a7\u5236\u7684\u6e7f\u5ea6\u4f1a\u8d8a\u5927\uff0c\u9006\u65f6\u9488\u8d8a\u5c0f<\/p>\n\n\n\n<p>3\uff0c\u6570\u5b57\u91cf\u8f93\u51faD0\u53ef\u4ee5\u4e0e\u5355\u7247\u673a\u76f4\u63a5\u76f8\u8fde\uff0c\u901a\u8fc7\u5355\u7247\u673a\u6765\u68c0\u6d4b\u9ad8\u4f4e\u7535\u5e73\uff0c\u7531\u6b64\u6765\u68c0\u6d4b\u571f\u58e4\u6e7f\u5ea6\uff1b<\/p>\n\n\n\n<p>4\uff0c\u5c0f\u677f\u6a21\u62df\u91cf\u8f93\u51faAO(0~1023)\u53ef\u4ee5\u548cAD\u6a21\u5757\u76f8\u8fde\uff0c\u901a\u8fc7AD\u8f6c\u6362\uff0c\u53ef\u4ee5\u83b7\u5f97\u571f\u58e4\u6e7f\u5ea6\u66f4\u7cbe\u786e\u7684\u6570\u503c\uff1b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3b\u8981\u6280\u672f\u53c2\u6570<\/h2>\n\n\n\n<p>1\uff0c\u56e0\u4e3a\u957f\u671f\u4e0e\u6c34\u9508\u8680\uff0c\u4e00\u822c\u5bff\u547d\u57281\u5e74\u5de6\u53f3\uff0c\u771f\u5b9e\u60c5\u51b5\u8fd8\u8981\u770b\u5177\u4f53\u7684\u52a0\u5de5\u5de5\u827a<\/p>\n\n\n\n<p>2\uff0c\u901a\u8fc7\u7535\u4f4d\u5668\u8c03\u8282\u63a7\u5236\u76f8\u5e94\u9600\u503c\uff0c<\/p>\n\n\n\n<p>\u6e7f\u5ea6\u4f4e\u4e8e\u8bbe\u5b9a\u503c\u65f6\uff0cDO\u8f93\u51fa\u9ad8\u7535\u5e73\uff0c\u6a21\u5757\u63d0\u793a\u706f\u4eae\uff1b<\/p>\n\n\n\n<p>\u6e7f\u5ea6\u9ad8\u4e8e\u8bbe\u5b9a\u503c\u65f6\uff0cDO\u8f93\u51fa\u4f4e\u7535\u5e73\uff0c\u6a21\u5757\u63d0\u793a\u706f\u706d\u3002<\/p>\n\n\n\n<p>3\uff0c\u6bd4\u8f83\u5668\u91c7\u7528LM393\u82af\u7247\uff0c\u5de5\u4f5c\u7a33\u5b9a\uff1b<\/p>\n\n\n\n<p>4\uff0c\u5de5\u4f5c\u7535\u538b3.3V-5V\u3002<\/p>\n\n\n\n<p>3V\u65f6\uff0c\u5728\u7a7a\u6c14\u4e2dAO\u8bfb\u53d6\u7684\u503c\u6700\u5927\u4e3a695 \uff0c \u6d78\u6ce1\u5728\u6c34\u91cc\u7684&nbsp;\u6700\u5c0f\u503c245\uff1b<\/p>\n\n\n\n<p>5V\u65f6\uff0c\u5728\u7a7a\u6c14\u4e2dAO\u8bfb\u53d6\u7684\u503c\u6700\u5927\u4e3a1023 \uff0c\u6d78\u6ce1\u5728\u6c34\u91cc\u7684\u6700\u5c0f\u503c 245\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>BOM\u8868<\/h2>\n\n\n\n<p>Ardunio Uno &nbsp; &nbsp; &nbsp; &nbsp;*1<\/p>\n\n\n\n<p>\u571f\u58e4\u6e7f\u5ea6\u4f20\u611f\u5668 &nbsp; *1<\/p>\n\n\n\n<p>\u8df3\u7ebf &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \u82e5\u5e72<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5f15\u811a\u8bf4\u660e<\/h2>\n\n\n\n<p>1 VCC &nbsp;--- \u5916\u63a53.3V-5V<br>2 GND &nbsp;--- \u5916\u63a5GND<br>3 DO &nbsp; &nbsp; --- \u5c0f\u677f\u6570\u5b57\u91cf\u8f93\u51fa\u63a5\u53e3\uff080\u548c1\uff09<br>4 AO &nbsp; &nbsp; --- \u5c0f\u677f\u7535\u538b\u6a21\u62df\u91cf\u8f93\u51fa<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u63a5\u7ebf\u65b9\u5f0f<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdn.net\/20160515150342544\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u6ce8\u610f\uff1a\u6a21\u5757\uff08\u5c0f\u677f\uff09\u8fde\u63a5\u4f20\u611f\u5668\u7684\u4e24\u6761\u7ebf\u4e0d\u5206\u6b63\u8d1f\uff0c\u968f\u4fbf\u63a5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7a0b\u5e8f\u5b9e\u73b0<\/h2>\n\n\n\n<p>\u628a\u7a0b\u5e8f\u4e0a\u4f20\u5230\u677f\u5b50\u540e\uff0c\u70b9\u5f00\u4e32\u53e3\u76d1\u89c6\u5668\uff0c\u67e5\u770b\u6570\u503c\u7684\u53d8\u5316\u3002<\/p>\n\n\n\n<p>\u7a0b\u5e8f\u6253\u5305\u4e0b\u8f7d\uff1a<a href=\"https:\/\/u16460183.ctfile.com\/fs\/16460183-295331032\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/u16460183.ctfile.com\/fs\/16460183-295331032<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/LingShun Lab #define Moisture A0 \/\/\u5b9a\u4e49AO \u5f15\u811a \u4e3a IO-A0#define DO 7        \/\/\u5b9a\u4e49DO \u5f15\u811a \u4e3a IO-7 void setup() {  pinMode(Moisture, INPUT);\/\/\u5b9a\u4e49A0\u4e3a\u8f93\u5165\u6a21\u5f0f  pinMode(DO, INPUT);  Serial.begin(9600);} void loop() {  \/\/\u4e32\u53e3\u8fd4\u56de\u6d4b\u91cf\u6570\u636e  Serial.print(\"Moisture=\");  Serial.print(analogRead(Moisture));\/\/\u8bfb\u53d6AO\u7684\u6570\u503c  Serial.print(\"|DO=\");  Serial.println(digitalRead(DO));\/\/\u8bfb\u53d6DO\u7684\u6570\u503c  delay(1000);}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9e\u4f8b\u6548\u679c<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdn.net\/20160515154045498\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u4f20\u611f\u5668\u6d78\u6ce1\u5728\u6c34\u4e2d\u548c\u63d0\u8d77\u7684\u6765\u7684\u6570\u636e\u53d8\u5316\uff0c<\/p>\n\n\n\n<p>Moisture\u6570\u503c\u8d8a\u5c0f\uff0c\u6e7f\u5ea6\u8d8a\u9ad8\uff0c\u53cd\u4e4b\u8d8a\u4f4e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img-blog.csdn.net\/20160515152049645\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u539f\u6587\uff1a<a href=\"https:\/\/blog.csdn.net\/ling3ye\/article\/details\/51416786?locationNum=14&amp;fps=1\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/ling3ye\/article\/details\/51416786?locationNum=14&amp;fps=1<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"692\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u571f\u58e4\u6e7f\u5ea6\u4f20\u611f\u5668 1\uff0c\u4f20\u611f\u5668\u9002\u7528\u4e8e\u571f\u58e4\u7684\u6e7f\u5ea6\u68c0\u6d4b\uff1b 2\uff0c\u6a21\u5757\u4e2d\u84dd\u8272\u7684\u7535\u4f4d\u5668\u662f\u7528\u4e8e\u571f\u58e4\u6e7f\u5ea6\u7684\u9600\u503c\u8c03\u8282\uff0c \u987a\u65f6\u9488\u8c03\u8282\uff0c\u63a7\u5236 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9],"tags":[],"class_list":["post-692","post","type-post","status-publish","format-standard","hentry","category-arduino","category-9"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=692"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/692\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}