{"id":1761,"date":"2021-06-05T11:47:32","date_gmt":"2021-06-05T03:47:32","guid":{"rendered":"http:\/\/mgspace.wiki\/docs\/?post_type=docs&#038;p=1761"},"modified":"2021-06-05T11:47:32","modified_gmt":"2021-06-05T03:47:32","slug":"%e8%be%93%e5%85%a5-input","status":"publish","type":"docs","link":"http:\/\/mgspace.wiki\/docs\/?docs=%e8%be%93%e5%85%a5-input","title":{"rendered":"\u8f93\u5165-INPUT"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"378\" src=\"http:\/\/mgspace.wiki\/docs\/wp-content\/uploads\/2021\/06\/image-11.png\" alt=\"\" class=\"wp-image-1684\" srcset=\"http:\/\/mgspace.wiki\/docs\/wp-content\/uploads\/2021\/06\/image-11.png 684w, http:\/\/mgspace.wiki\/docs\/wp-content\/uploads\/2021\/06\/image-11-500x276.png 500w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>\u6570\u5b57\u8f93\u5165<\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6570\u5b57\u7535\u5b50\u7684\u4e16\u754c\u4e2d\uff0c\u6709\u8f93\u51fa\uff0c\u4e5f\u4f1a\u6709\u8f93\u5165\u3002\u8fd9\u8ddf\u4f60\u5728\u751f\u6d3b\u4e2d\u6709\u8d22\u52a1\u652f\u51fa\uff0c\u4e5f\u6709\u6536\u5165\u7c7b\u4f3c\u3002\u5f00\u5173\uff08switch\uff09\u662f\u4e00\u79cd\u6700\u57fa\u672c\u7684\u8f93\u5165\u5f62\u5f0f\u4e86\u3002\u901a\u5e38\u6211\u4eec\u6309\u4e00\u4e2a\u5f00\u5173\u5c31\u80fd\u6253\u5f00\u7535\u706f\uff0c\u6216\u8005\u6309\u4e00\u4e2a\u5f00\u5173\u6253\u5f00\u7528\u7535\u5668\u7684\u7535\u6e90\u3002\u5f00\u5173\u7684\u529f\u80fd\u662f\u8fde\u63a5\u6216\u65ad\u5f00\u7535\u8def\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Arduino\u7684\u6570\u5b57IO\u53e3\u4e0a\u80fd\u8bfb\u51fa\u4e24\u4e2a\u72b6\u6001\u503c\uff0c\u4e00\u4e2a\u662f\u9ad8\u7535\u5e73\uff085V\uff09\uff0c\u53e6\u4e00\u4e2a\u662f\u4f4e\u7535\u5e73\uff080V\uff09\u3002\u6240\u4ee5\u6211\u4eec\u53ea\u8981\u8bbe\u8ba1\u4e00\u4e2a\u7535\u8def\u80fd\u8ba9Arduino\u7684\u5f15\u811a\u5728\u9ad8\u4f4e\u7535\u5e73\u8fd9\u4e24\u4e2a\u72b6\u6001\u503c\u4e4b\u95f4\u5207\u6362\uff0c\u5c31\u80fd\u8ba9Arduino\u5206\u8fa8\u51fa\u5f00\u5173\u7684\u72b6\u6001\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u8981\u7ed9arduino\u5916\u754c\u6309\u952e\uff0c\u6211\u4eec\u9700\u8981\u7528\u5230\u4e0a\u62c9\u7535\u963b\uff0c\u5177\u4f53\u5185\u5bb9\u8bf7\u53c2\u8003\u6587\u7ae0<a href=\"http:\/\/mgspace.wiki\/docs\/?docs=%e4%b8%8a%e6%8b%89%e8%be%93%e5%85%a5\" target=\"_blank\" rel=\"noreferrer noopener\">\u300a\u4e0a\u62c9\u8f93\u5165\u300b<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><strong>\u6a21\u62df\u8f93\u5165<\/strong><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Arduino\u80fd\u5bf9\u6570\u5b57\u4fe1\u53f7\u8fdb\u884c\u6709\u6548\u7684\u5904\u7406\u548c\u8bc6\u522b\uff0c\u4f46\u662f\u751f\u6d3b\u4e0a\u5f88\u591a\u4e1c\u897f\uff0c\u5f88\u591a\u6982\u5ff5\u90fd\u4e0d\u662f\u4e00\u4e2a\u6570\u5b57\u91cf\u3002\u6bd4\u5982\u8bf4\u6e29\u5ea6\u503c\uff0c\u5c31\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u4f8b\u5b50\uff0c\u5b83\u662f\u4e00\u4e2a\u8fde\u7eed\u53d8\u5316\u7684\u4fe1\u53f7\uff0c\u4e0d\u53ef\u80fd\u67090\u52301\u7684\u7a81\u53d8\u3002\u8fd9\u4e5f\u662f\u6a21\u62df\u8f93\u5165\u5b58\u5728\u7684\u5fc5\u8981\u6027\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f88\u597d\u7406\u89e3\u3002\u6211\u4eec\u53ea\u8981\u4f7f\u7528\u4f20\u611f\u5668\uff08sensor\uff09\uff0c\u5c06\u6a21\u62df\u91cf\u6709\u6548\u8f6c\u6362\u4e3aArduino\u80fd\u591f\u8bc6\u522b\u7684\u5f62\u5f0f\u3002\u4f8b\u5982\u8f6c\u6362\u6210\u7535\u538b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u5982\uff0c\u4e00\u79cd\u6e29\u5ea6\u4f20\u611f\u5668\u80fd\u591f\u5c06\u6e29\u5ea6\u503c\u8f6c\u6362\u62100V\u52305V\u95f4\u7684\u67d0\u4e2a\u7535\u538b\uff0c\u6bd4\u59820.3V\u30013.27V\u30014.99V\u7b49\u7b49\u3002\u7531\u4e8e\u4f20\u611f\u5668\u8868\u8fbe\u7684\u662f\u6a21\u62df\u4fe1\u53f7\uff0c\u5b83\u4e0d\u4f1a\u50cf\u6570\u5b57\u4fe1\u53f7\u90a3\u6837\u53ea\u6709\u7b80\u5355\u7684\u9ad8\u7535\u5e73\u548c\u4f4e\u7535\u5e73\uff0c\u800c\u6709\u53ef\u80fd\u662f\u5728\u8fd9\u4e24\u8005\u4e4b\u95f4\u7684\u4efb\u4f55\u4e00\u4e2a\u6570\u503c\u3002\u81f3\u4e8e\u5230\u5e95\u6709\u591a\u5c11\u53ef\u80fd\u7684\u503c\u5219\u53d6\u51b3\u4e8e\u6a21\u6570\u8f6c\u6362\u7684\u7cbe\u5ea6\uff0c\u7cbe\u5ea6\u8d8a\u9ad8\u80fd\u591f\u5f97\u5230\u7684\u503c\u5c31\u4f1a\u8d8a\u591a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u800cArduino\u91c7\u7528\u7684ADC\uff08Analog to Digital Converter\uff09\uff0c\u79f0\u6a21\u6570\u8f6c\u6362\uff0c\u6bcf\u4e00\u4e2a\u6a21\u6570\u8f6c\u6362\u5668\u7684\u7cbe\u5ea6\u90fd\u662f10bit\uff0c\u4e5f\u5c31\u662f\u8bf4\u80fd\u591f\u8bfb\u53d61024\uff082^10 = 1024\uff09\u4e2a\u72b6\u6001\u3002\u5728Arduino\u7684\u6bcf\u4e00\u4e2a\u6a21\u62df\u8f93\u5165\u7ba1\u811a\u4e0a\uff0c\u7535\u538b\u7684\u53d8\u5316\u8303\u7574\u662f\u4ece0V\u52305V\uff0c\u56e0\u6b64Arduino\u80fd\u591f\u611f\u77e5\u5230\u7684\u6700\u5c0f\u7535\u538b\u53d8\u5316\u662f4.8\u6beb\u4f0f\uff085\/1024 = 4.8mV\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6570\u5b57\u8f93\u5165 \u5728\u6570\u5b57\u7535\u5b50\u7684\u4e16\u754c\u4e2d\uff0c\u6709\u8f93\u51fa\uff0c\u4e5f\u4f1a\u6709\u8f93\u5165\u3002\u8fd9\u8ddf\u4f60\u5728\u751f\u6d3b\u4e2d\u6709\u8d22\u52a1\u652f\u51fa\uff0c\u4e5f\u6709\u6536\u5165\u7c7b\u4f3c\u3002\u5f00\u5173\uff08switch\uff09 &hellip; <a href=\"http:\/\/mgspace.wiki\/docs\/?docs=%e8%be%93%e5%85%a5-input\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u8f93\u5165-INPUT\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[65],"doc_tag":[],"class_list":["post-1761","docs","type-docs","status-publish","hentry","doc_category-i-o"],"_links":{"self":[{"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/docs\/1761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1761"}],"version-history":[{"count":1,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/docs\/1761\/revisions"}],"predecessor-version":[{"id":1762,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=\/wp\/v2\/docs\/1761\/revisions\/1762"}],"wp:attachment":[{"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1761"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_category&post=1761"},{"taxonomy":"doc_tag","embeddable":true,"href":"http:\/\/mgspace.wiki\/docs\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}