{"id":19009,"date":"2022-04-28T00:00:12","date_gmt":"2022-04-27T16:00:12","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=19009"},"modified":"2022-04-27T23:03:27","modified_gmt":"2022-04-27T15:03:27","slug":"%e4%bd%bf%e7%94%a8raspberry-pi%e8%bf%9b%e8%a1%8c%e4%bc%a0%e6%84%9f%e5%99%a8%e8%be%93%e5%85%a5%e5%ae%9e%e9%aa%8c","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/raspberry\/sensor-input-experiment-using-raspberry-pi","title":{"rendered":"\u4f7f\u7528Raspberry Pi\u8fdb\u884c\u4f20\u611f\u5668\u8f93\u5165\u5b9e\u9a8c"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e<a href=\"https:\/\/www.deviceplus.com\/\">DevicePlus.com<\/a>\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002<\/p>\n<p><em>\u672c\u6587\u6700\u521d\u53d1\u5e03\u5728<a href=\"http:\/\/deviceplus.jp\">deviceplus.jp<\/a>\u7f51\u7ad9\u4e0a\uff0c\u800c\u540e\u88ab\u7ffb\u8bd1\u6210\u82f1\u8bed\u3002<\/em><\/p>\n<p>\u5728\u672c\u7cfb\u5217\u6587\u7ae0\u4e2d\uff0c\u4e3b\u8981\u662f\u901a\u8fc7\u4f7f\u7528Raspberry Pi\u521b\u5efa\u7684\u7b80\u5355\u9879\u76ee\u6765\u5b66\u4e60\u7535\u5b50\u8bbe\u8ba1\u7684\u539f\u7406\u548c\u57fa\u7840\u77e5\u8bc6\u3002\u6b64\u6b21\u7684\u5206\u4eab\u5609\u5bbe\u662f\u4f0a\u85e4\u5c1a\u672a\u5148\u751f\uff0c\u4e00\u4f4d\u5a92\u4f53\u827a\u672f\u5bb6\u548c\u4f5c\u5bb6\uff0c\u4ee5\u8bb2\u89e3\u201c\u66f4\u6df1\u5c42\u6b21\u7684\u539f\u7406\u201d\u800c\u95fb\u540d\u3002\u672c\u6587\u5c06\u63a2\u8ba8\u4f20\u611f\u5668\u8f93\u5165\u5b9e\u9a8c\u3002<\/p>\n<h2>[\u76ee\u5f55]<\/h2>\n<p>1. \u524d\u8a00<br \/>\n2. \u7535\u673a\u65cb\u8f6c\u539f\u7406<br \/>\n3. \u4f20\u611f\u5668\u6982\u8ff0<br \/>\n4. \u5149\u7535\u6676\u4f53\u7ba1\u4e0eGPIO\u7684\u8fde\u63a5<br \/>\n5. \u5149\u53cd\u5c04\u5668\u4e0eGPIO\u7684\u8fde\u63a5<br \/>\n6. \u7ed3\u8bba<\/p>\n<h2>1. \u7b80\u4ecb<\/h2>\n<p>\u8fd9\u4e2a\u4e16\u754c\u6bcf\u5929\u90fd\u5728\u98de\u901f\u53d1\u5c55\uff0c\u5f88\u591a\u4eba\u8ddf\u4e0d\u4e0a\u53d1\u5c55\u7684\u6b65\u4f10\uff0c\u5e76\u975e\u4ed6\u4eec\u5bf9\u65b0\u4e8b\u7269\u4e0d\u611f\u5174\u8da3\uff0c\u800c\u662f\u5728\u5404\u4e2a\u65b9\u9762\u4e0e\u65f6\u4ff1\u8fdb\u5b9e\u5728\u662f\u5fc3\u4f59\u529b\u7ecc\u3002\u56e0\u6b64\uff0c\u6211\u4f1a\u5148\u5bf9\u5404\u7c7b\u4e0d\u540c\u4e8b\u52a1\u8fdb\u884c\u601d\u8003\uff0c\u7136\u540e\u6574\u7406\u601d\u8003\u7ed3\u679c\u5e76\u786e\u5b9a\u6211\u5e94\u8be5\u505a\u7684\u4e8b\u60c5\uff0c\u4e13\u6ce8\u4e8e\u6211\u8ba4\u4e3a\u6709\u8da3\u7684\u4e8b\u60c5\u5e76\u5168\u8eab\u5fc3\u6295\u5165\u53bb\u505a\uff0c\u8fd9\u5c31\u662f\u4eca\u5929\u6211\u5728\u8fd9\u91cc\u6240\u505a\u7684\u5de5\u4f5c\u7684\u6e90\u52a8\u529b\u3002<\/p>\n<h2>2. \u7535\u673a\u65cb\u8f6c\u539f\u7406<\/h2>\n<p>\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\u6211\u4eec\u7528\u7684\u662f\u76f4\u6d41\u7535\u673a\u3002\u6211\u5728\u6c7d\u8f66\u6a21\u578b\u3001\u5851\u6599\u6a21\u578b\u548c\u65e0\u7ebf\u7535\u63a7\u5236\u6a21\u578b\u65b9\u9762\u6709\u7740\u4e30\u5bcc\u7684\u7ecf\u9a8c\u3002\u6211\u8ba4\u4e3a\u76f4\u6d41\u7535\u673a\u5c31\u50cf\u662f\u80fd\u91cf\u8f6c\u6362\u7684\u4ee3\u8868\uff0c\u80fd\u591f\u5c06\u7535\u80fd\u8f6c\u6362\u6210\u52a8\u80fd\u3002\u4e0b\u9762\u901a\u8fc7\u7b80\u5355\u7684\u539f\u7406\u56fe\u6765\u5177\u4f53\u8bf4\u660e\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8802\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1.jpg\" alt=\"Mechanism for Turning the Motor\" width=\"700\" height=\"614\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1-300x263.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1-166x146.jpg 166w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1-50x44.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-1-86x75.jpg 86w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>\u5f53\u7136\uff0c\u57fa\u672c\u539f\u7406\u662f\u7535\u6d41\u4ea7\u751f\u7684\u78c1\u573a\u4f1a\u5f71\u54cd\u6c38\u78c1\u4f53\uff08\u94c1\u6c27\u4f53\u78c1\u94c1\uff09\u7684\u78c1\u573a\uff0c\u4ece\u800c\u4ea7\u751f\u7b49\u4e8e\u52a8\u80fd\u7684\u7269\u7406\u529b\u3002\u60f3\u77e5\u9053\u8fd9\u4e2a\u673a\u7406\u662f\u4ec0\u4e48\u5417\uff1f\u5bf9\uff0c\u5c31\u662f\u5f17\u83b1\u660e\u5de6\u624b\u5b9a\u5219\u3002\u5927\u5bb6\u5e94\u8be5\u90fd\u542c\u8bf4\u8fc7\u5427\u3002<\/p>\n<p><strong>\u5f17\u83b1\u660e\u5de6\u624b\u5b9a\u5219<\/strong><br \/>\n\u9996\u5148\uff0c\u60a8\u5e94\u8be5\u77e5\u9053\uff0c\u5f17\u83b1\u660e\u5b9a\u5219\u5206\u4e3a\u53f3\u624b\u5b9a\u5219\u548c\u5de6\u624b\u5b9a\u5219\u3002\u62c7\u6307\u3001\u98df\u6307\u548c\u4e2d\u6307\u4e92\u76f8\u5782\u76f4\uff0c\u5206\u522b\u4ee3\u8868\u4e09\u7ef4XYZ\u8f74\u3002\u62c7\u6307\u4ee3\u8868\u529b\u7684\u65b9\u5411\uff0c\u98df\u6307\u4ee3\u8868\u78c1\u573a\u7684\u65b9\u5411\uff0c\u4e2d\u6307\u4ee3\u8868\u7535\u6d41\u6d41\u52a8\u7684\u65b9\u5411\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8803\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2.jpg\" alt=\"Fleming\u2019s Law left-hand rule\" width=\"500\" height=\"223\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2-300x134.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2-260x116.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2-50x22.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-2-150x67.jpg 150w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u901a\u8fc7\u4f7f\u81ea\u5df1\u7684\u5de6\u53f3\u624b\u6446\u6210\u8fd9\u79cd\u9020\u578b\uff0c\u5373\u53ef\u76f4\u63a5\u4e86\u89e3\u8fd9\u4e09\u8005\u4e4b\u95f4\u7684\u5173\u7cfb\u3002\u5c06\u8098\u90e8\u5f2f\u66f2\u5e76\u6682\u4e14\u5c06\u624b\u62c9\u81f3\u80f8\u524d\uff0c\u7136\u540e\u5c06\u8098\u90e8\u5411\u5de6\u53f345\u5ea6\u65b9\u5411\u4f38\u5c55\uff0c\u5e76\u5927\u58f0\u8bf4\u201c\u8036\uff01\u201d  \u5173\u952e\u5728\u4e8e\u5de6\u53f3\u624b\u7684\u5f62\u72b6\u3002\u4e00\u53ea\u624b\u4ee3\u8868\u7535\u673a\u7684\u539f\u7406\uff0c\u53e6\u4e00\u53ea\u624b\u4ee3\u8868\u53d1\u7535\u673a\u7684\u539f\u7406\uff0c\u600e\u4e48\u6837\uff1f\u5927\u5bb6\u8fd8\u8bb0\u5f97\u54ea\u53ea\u624b\u4ee3\u8868\u7535\u673a\u54ea\u53ea\u624b\u4ee3\u8868\u53d1\u7535\u673a\u5417\uff1f<\/p>\n<p>\u4e00\u53ea\u624b\u4ee3\u8868\u901a\u8fc7\u7535\u80fd\u4ea7\u751f\u52a8\u80fd\u7684\u7535\u673a\uff1b\u53e6\u4e00\u53ea\u624b\u4ee3\u8868\u901a\u8fc7\u52a8\u80fd\u521b\u9020\u7535\u80fd\u7684\u53d1\u7535\u673a\u3002\u5bf9\u4e8e\u60ef\u7528\u53f3\u624b\u7684\u4eba\u800c\u8a00\uff0c\u5f88\u5bb9\u6613\u5c31\u80fd\u8bb0\u4f4f\u53f3\u624b\u662f\u52e4\u52e4\u6073\u6073\u4e0d\u65ad\u8fd0\u52a8\u7684\u201c\u53d1\u7535\u673a\u201d\uff0c\u90a3\u4e48\u5de6\u624b\u5c31\u662f\u52a8\u4f5c\u4e0d\u591f\u9ebb\u5229\u7684\u201c\u7535\u673a\u201d\u3002\u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u8fdb\u5165\u4e3b\u9898\uff0c\u5c1d\u8bd5\u901a\u8fc7Raspberry Pi\u4f7f\u7528\u4f20\u611f\u5668\u3002<\/p>\n<h2>3. \u4f20\u611f\u5668\u6982\u8ff0<\/h2>\n<p>\u4e00\u63d0\u5230\u4f20\u611f\u5668\uff0c\u5927\u5bb6\u5c31\u4f1a\u60f3\u5230\u4e00\u4e2a\u4ee5\u7535\u5b50\u65b9\u5f0f\u68c0\u6d4b\u67d0\u4e9b\u6761\u4ef6\u72b6\u6001\u7684\u88c5\u7f6e\u6216\u7535\u5b50\u5668\u4ef6\u3002\u5177\u4f53\u6709\u54ea\u4e9b\u6761\u4ef6\u72b6\u6001\u5462\uff1f\u5305\u62ec\u5149\u3001\u58f0\u97f3\u3001\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u503e\u659c\u5ea6\u4ee5\u53ca\u52a0\u901f\u5ea6\u7b49\u3002\u6bd4\u5982\u5728\u6211\u4eec\u7684\u65e5\u5e38\u751f\u6d3b\u4e2d\u79bb\u6211\u4eec\u5f88\u8fd1\u4f46\u6211\u4eec\u5374\u4e0d\u60f3\u7ecf\u5386\u7684\u706b\u707e\u62a5\u8b66\u5668\uff0c\u914d\u6709\u80fd\u591f\u611f\u5e94\u6e29\u5ea6\u548c\u70df\u96fe\u7684\u4f20\u611f\u5668\uff0c\u5f53\u6e29\u5ea6\u548c\u70df\u96fe\u8fbe\u5230\u4e00\u5b9a\u6761\u4ef6\u65f6\u5373\u4f1a\u89e6\u53d1\u8b66\u62a5\u673a\u5236\u3002\u53e6\u5916\uff0c\u6570\u7801\u76f8\u673a\u4e5f\u914d\u5907\u6709\u5149\u4f20\u611f\u5668\u3002\u73b0\u5728\u7684\u4f20\u611f\u5668\u5df2\u7ecf\u975e\u5e38\u5148\u8fdb\uff0c\u751a\u81f3\u53ef\u4ee5\u901a\u8fc7\u4eba\u5de5\u667a\u80fd\uff08AI\uff09\u6280\u672f\u5206\u6790\u56fe\u50cf\u548c\u8bc6\u522b\u56fa\u4f53\u7269\uff0c\u8fd9\u79cd\u8bc6\u522b\u80fd\u529b\u5df2\u7ecf\u8d85\u8fc7\u4e86\u4f20\u611f\u5668\u672c\u8eab\u7684\u529f\u80fd\u3002<\/p>\n<p>\u53ef\u4ee5\u60f3\u8c61\u4e00\u4e0b\uff0c\u5f53\u60a8\u8d70\u5728\u8857\u4e0a\uff0c\u542c\u5230\u6709\u4eba\u558a\u60a8\uff0c\u5982\u679c\u9047\u5230\u5fc3\u91cc\u60f3\u201c\u8fd9\u662f\u8c01\u6765\u7740?\u201d\u7684\u60c5\u51b5\uff0c\u6b64\u65f6\u6b64\u523b\uff0c\u771f\u5e0c\u671b\u81ea\u5df1\u7684\u5927\u8111\u80fd\u8fde\u63a5AI\u8bbe\u5907\u554a\u3002<br \/>\n\u603b\u4e4b\uff0c\u7535\u5b50\u4f5c\u54c1\u53ef\u4ee5\u4f7f\u7528\u7684\u8bbe\u5907\u3001\u5143\u5668\u4ef6\u53ca\u5176\u5de5\u4f5c\u673a\u5236\u79cd\u7c7b\u7e41\u591a\uff0c\u8fd8\u6709\u4e00\u4e9b\u4ea7\u54c1\u53ef\u4ee5\u50cf\u6269\u5c55\u7ec4\u4ef6\u4e00\u6837\u4e0e\u5fae\u63a7\u5236\u5668\u76f8\u8fde\uff0c\u5e76\u76f4\u63a5\u83b7\u53d6\u6570\u636e\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u56de\u5f52\u57fa\u7840\uff0c\u4f7f\u7528\u4e00\u79cd\u53eb\u505a\u201c\u5149\u7535\u6676\u4f53\u7ba1\u201d\u7684\u5149\u4f20\u611f\u5668\u3002\u4ee5\u524d\uff0c\u63d0\u5230\u5149\u4f20\u611f\u5668\uff0c\u5c31\u662f\u6307\u786b\u5316\u9549\uff08CdS\uff09\u5149\u654f\u7535\u963b\uff0c\u8fd9\u662f\u4e00\u79cd\u4e00\u65e6\u63a5\u6536\u5230\u5149\u5176\u7535\u963b\u503c\u5c31\u4f1a\u4e0b\u964d\u7684\u5143\u4ef6\u3002\u987e\u540d\u601d\u4e49\uff0c\u8fd9\u79cd\u4f20\u611f\u5668\u91c7\u7528\u786b\u5316\u9549\u5236\u6210\uff0c\u4f46\u51fa\u4e8e\u73af\u4fdd\u65b9\u9762\u7684\u8003\u8651\uff0c\u8fd9\u79cd\u4f20\u611f\u5668\u7684\u4f7f\u7528\u5df2\u7ecf\u8d8a\u6765\u8d8a\u5c11\u3002<\/p>\n<div id=\"attachment_8804\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8804\" class=\"size-full wp-image-8804\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3.jpg\" alt=\"about the sensors\" width=\"500\" height=\"330\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3-300x198.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3-221x146.jpg 221w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3-50x33.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-3-114x75.jpg 114w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p id=\"caption-attachment-8804\" class=\"wp-caption-text\">NJL7502L\u5149\u7535\u6676\u4f53\u7ba1\uff08\u5de6\uff09\u548c2\u4e2a\u786b\u5316\u9549\u5149\u654f\u7535\u963b\uff08\u53f3\uff09<\/p>\n<\/div>\n<p>\u8fd9\u79cd\u5149\u7535\u6676\u4f53\u7ba1\u91c7\u7528\u534a\u5bfc\u4f53\u5236\u6210\uff0c\u4e0e\u4e00\u822c\u7684\u53cc\u6781\u6676\u4f53\u7ba1\u7ed3\u6784\u76f8\u540c\u3002\u4e8c\u8005\u552f\u4e00\u7684\u533a\u522b\u662f\u5149\u7535\u6676\u4f53\u7ba1\u7684\u8f93\u5165\u662f\u5149\u3002<\/p>\n<div id=\"attachment_8805\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8805\" class=\"size-full wp-image-8805\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4.jpg\" alt=\"phototransistor polarity\" width=\"500\" height=\"299\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4-300x179.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4-244x146.jpg 244w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4-50x30.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-4-125x75.jpg 125w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p id=\"caption-attachment-8805\" class=\"wp-caption-text\">\u56fe\u5f62\u7b26\u53f7<\/p>\n<\/div>\n<p>\u4ece\u56fe\u5f62\u7b26\u53f7\u6765\u770b\uff0c\u8fd9\u79cd\u6676\u4f53\u7ba1\u4e0eNPN\u578b\u6676\u4f53\u7ba1\u76f8\u4f3c\uff0c\u4f46\u6ca1\u6709B\u7aef\uff08\u57fa\u6781\uff09\uff0c\u53d6\u800c\u4ee3\u4e4b\u7684\u662f\u4e00\u4e2a\u7bad\u5934\u3002\u8fd9\u4e2a\u7bad\u5934\u4ee3\u8868\u5149\uff0c\u56e0\u6b64B\u7aef\uff08\u57fa\u6781\uff09\u8f93\u5165\u7684\u5e76\u975e\u7535\u6d41\uff0c\u800c\u662f\u5165\u5c04\u5149\u3002\u4e5f\u5c31\u662f\u8bf4\uff0cC\u7aef\uff08\u96c6\u7535\u6781\uff09\u5230E\u7aef\uff08\u53d1\u5c04\u6781\uff09\u4e4b\u95f4\u8f93\u51fa\u7684\u662f\u5149\u7684\u5f3a\u5f31\u3002\u5177\u6709\u6839\u636e\u5149\u7684\u60c5\u51b5\u8fdb\u884c\u653e\u5927\u6216\u5f00\u5173\u7684\u529f\u80fd\u3002<\/p>\n<h2>\u5149\u7535\u6676\u4f53\u7ba1\u4e0eGPIO\u7684\u8fde\u63a5<\/h2>\n<p>\u6211\u4eec\u5c1d\u8bd5\u5c06\u5149\u7535\u6676\u4f53\u7ba1\u4e0eRaspberry Pi\u4e0a\u7684GPIO\u76f8\u8fde\u3002\u4f7f\u7528\u7684\u8bed\u8a00\u662fScratch\uff0c\u4f20\u611f\u5668\u7684\u53d6\u503c\u65b9\u6cd5\u4e0e\u5f00\u5173\u76f8\u540c\uff0c\u4e3a1\u548c0\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8806\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5.jpg\" alt=\"Connect the Phototransistor to the GPIO\" width=\"500\" height=\"270\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5-300x162.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5-260x140.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5-50x27.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-5-139x75.jpg 139w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u8fd9\u4e2a\u7535\u8def\u7b80\u76f4\u592a\u7b80\u5355\u4e86\uff0c\u7b80\u5355\u5230\u751a\u81f3\u8ba9\u4eba\u6000\u7591\u7528\u8fd9\u4e2a\u7535\u8def\u5230\u5e95\u80fd\u4e0d\u80fd\u5de5\u4f5c\uff0c\u90a3\u4e48\u5c31\u8ba9\u6211\u4eec\u6765\u8bd5\u4e00\u8bd5\u5427\u3002<br \/>\n\u5f53\u6ca1\u6709\u5149\u5c04\u5165\u5149\u7535\u6676\u4f53\u7ba1\u65f6\uff0c\u8f93\u5165\u8bbe\u7f6e\u4e3a\u201cpullup\u201d\uff0c\u56e0\u6b64\u5f00\u5173ON\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u6b64\u65f6\u503c\u4e3a1\u3002\u6709\u5149\u5c04\u5165\u65f6\uff0c\u5728\u5149\u7535\u6676\u4f53\u7ba1\u7684\u4f5c\u7528\u4e0b\uff0c\u8f93\u5165\u53d8\u4e3a\u8d1f\u503c\uff0c\u5f00\u5173OFF\uff0c\u503c\u53d8\u4e3a0\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8807\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6.jpg\" alt=\"set input GPIO to Pullup\" width=\"500\" height=\"378\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6-300x227.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6-193x146.jpg 193w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6-50x38.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-6-99x75.jpg 99w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u58f0\u660eGPIO\uff0c\u7136\u540e\u5c06\u8f93\u5165GPIO\u8bbe\u7f6e\u4e3a\u201cpullup\u201d\uff0c\u901a\u8fc7\u5c0f\u732b\u7f16\u7a0b\u8f6f\u4ef6\u3010\u5e94\u8be5\u662f\u6307\u513f\u7ae5\u7f16\u7a0b\u8f6f\u4ef6Scratch-\u8bd1\u6ce8\u3011\u8f93\u51fa\u7ed3\u679c\u3002\u5c06\u5149\u7167\u5c04\u5728\u4f20\u611f\u5668\u4e0a\uff0c\u6216\u7528\u624b\u906e\u4f4f\u4f20\u611f\u5668\u90e8\u5206\u6321\u4f4f\u5149\uff0c\u53ef\u4ee5\u770b\u5230\u503c\u53d8\u62101\u6216\u80050\u3002\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528\u7684\u662f\u5149\u4f20\u611f\u5668\uff0c\u5927\u5bb6\u4e5f\u53ef\u91c7\u7528\u5176\u4ed6\u4e0d\u540c\u7684\u4f20\u611f\u5668\u6765\u8bd5\u4e00\u8bd5\u5236\u4f5c\u4e0d\u540c\u7684\u4f5c\u54c1\u3002\u4f8b\u5982\uff0c\u91c7\u7528\u6e29\u5ea6\u4f20\u611f\u5668\u2014\u2014\u70ed\u654f\u7535\u963b\uff0c\u521b\u5efa\u4e00\u4e2a\u5f53\u6e29\u5ea6\u5347\u9ad8\u65f6\u53ef\u4ee5\u6253\u5f00\u7535\u673a\u9001\u98ce\u7684\u88c5\u7f6e\uff1b\u8fd8\u53ef\u4e0e\u6e7f\u5ea6\u4f20\u611f\u5668\u914d\u5408\u4f7f\u7528\uff0c\u521b\u5efa\u4e2d\u6691\u8b66\u62a5\u5668\u7b49\u4f5c\u54c1\u3002\u603b\u4e4b\uff0cGPIO\u8f93\u5165\u771f\u7684\u975e\u5e38\u65b9\u4fbf\uff01<\/p>\n<h2>\u901a\u8fc7\u5149\u6765\u68c0\u6d4b\u7269\u4f53\u7684\u4f20\u611f\u5668<\/h2>\n<p>\u5728\u5f88\u591a\u60c5\u51b5\u4e0b\uff0c\u5149\u7535\u6676\u4f53\u7ba1\u53ef\u80fd\u4f1a\u53d7\u5230\u5468\u56f4\u73af\u5883\u5149\u7684\u5f71\u54cd\u3002\u5f53\u7136\uff0c\u5728\u9ed1\u6697\u7684\u73af\u5883\u4e2d\u8fd9\u79cd\u4f20\u611f\u5668\u5c31\u6ca1\u6709\u7528\u6b66\u4e4b\u5730\u4e86\u3002\u56e0\u6b64\uff0c\u4e0eLED\u7ed3\u5408\u4f7f\u7528\uff0c\u4e5f\u5c31\u662f\u4e0e\u5149\u6e90\u914d\u5bf9\u4f7f\u7528\u5149\u7535\u6676\u4f53\u7ba1\uff0c\u6548\u679c\u4f1a\u66f4\u597d\u3002\u8fd9\u79cd\u914d\u5bf9\u4f7f\u7528\u7684\u5143\u5668\u4ef6\u6709\u5f88\u591a\u79cd\uff0c\u5177\u4f53\u7684\u7ed3\u6784\u548c\u68c0\u6d4b\u65b9\u6cd5\u7b49\u4e5f\u4e0d\u5c3d\u76f8\u540c\u3002<\/p>\n<p>\u5149\u65ad\u7eed\u5668\u662f\u5c06\u5149\u7535\u6676\u4f53\u7ba1\u4e0eLDE\u6210\u76f4\u7ebf\u914d\u7f6e\uff0c\u4f7fLED\u7684\u5149\u76f4\u63a5\u8f93\u5165\u5230\u5149\u7535\u6676\u4f53\u7ba1\uff0c\u5f53\u6709\u7269\u4f53\u7a7f\u8fc7\u5b83\u4eec\u5f53\u4e2d\u5e76\u906e\u6321\u5149\u7ebf\u65f6\uff0c\u5c31\u4f1a\u68c0\u6d4b\u5230\u8be5\u7269\u4f53\u7684\u4e00\u79cd\u611f\u6d4b\u88c5\u7f6e\u3002\u6b64\u7c7b\u8bbe\u5907\u4e00\u822c\u7528\u4e8e\u5de5\u5382\u751f\u4ea7\u7ebf\u548c\u6253\u5370\u673a\u7b49\u8bbe\u5907\u4e2d\uff0c\u6240\u4ee5\u6211\u4eec\u5728\u751f\u6d3b\u4e2d\u5e76\u4e0d\u5e38\u89c1\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8808\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7.jpg\" alt=\"Photointerrupters\" width=\"500\" height=\"269\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7-300x161.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7-260x140.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7-50x27.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-7-139x75.jpg 139w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u5149\u53cd\u5c04\u5668\u5219\u662f\u5c06LED\u548c\u5149\u7535\u6676\u4f53\u7ba1\u5b89\u88c5\u5728\u540c\u4e00\u65b9\u5411\uff0c\u5f53\u6709\u7269\u4f53\u901a\u8fc7\u5b83\u4eec\u524d\u9762\u65f6\uff0c\u5c31\u4f1a\u68c0\u6d4b\u5230\u53cd\u5c04\u5149\u7684\u4e00\u79cd\u611f\u6d4b\u88c5\u7f6e\u3002\u6700\u5e38\u89c1\u7684\u5e94\u7528\u662f\u516c\u5171\u536b\u751f\u95f4\u7684\u81ea\u52a8\u51b2\u6c34\u4f20\u611f\u5668\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8809\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8.jpg\" alt=\"photo reflector\" width=\"300\" height=\"417\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8-216x300.jpg 216w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8-105x146.jpg 105w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8-36x50.jpg 36w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-8-54x75.jpg 54w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u5149\u7535\u8026\u5408\u5668\u7531LED\u548c\u5149\u7535\u6676\u4f53\u7ba1\u914d\u5bf9\u7ec4\u6210\uff0c\u4f46\u8fd9\u79cd\u4ea7\u54c1\u4e0d\u662f\u7528\u6765\u68c0\u6d4b\u5176\u95f4\u7269\u4f53\u7684\uff0c\u800c\u662f\u7528\u6765\u901a\u8fc7\u5149\u4f20\u8f93\u4fe1\u53f7\u7684\u3002\u56e0\u6b64\uff0c\u5149\u7535\u8026\u5408\u5668\u5e76\u4e0d\u662f\u4f20\u611f\u5668\uff0c\u4f46\u56e0\u5176\u540c\u6837\u4f7f\u7528\u4e86\u5149\u6e90\u548c\u5149\u63a5\u6536\u5668\u4ef6\u800c\u6682\u4e14\u5217\u4e3a\u4f20\u611f\u5668\u7684\u4f19\u4f34\u5427\u3002\u5149\u7535\u8026\u5408\u5668\u65e0\u9700\u8fde\u7535\u5373\u53ef\u4f20\u8f93\u4fe1\u53f7\uff0c\u56e0\u6b64\u9002\u7528\u4e8e\u6ce8\u91cd\u7535\u8def\u5b89\u5168\u7684\u5e94\u7528\uff0c\u4ee5\u53ca\u5411\u7535\u6c14\u7279\u6027\u4e0d\u540c\u7684\u7535\u8def\u4f20\u8f93\u4fe1\u53f7\u7684\u5e94\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8810\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-9.jpg\" alt=\"Photo couplers \" width=\"300\" height=\"180\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-9.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-9-243x146.jpg 243w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-9-50x30.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-9-125x75.jpg 125w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>\u5149\u53cd\u5c04\u5668\u4e0eGPIO\u7684\u8fde\u63a5<\/h2>\n<p>\u6b64\u6b21\uff0c\u6211\u4eec\u6253\u7b97\u4f7f\u7528<a href=\"http:\/\/rohmfs.rohm.com\/en\/products\/databook\/datasheet\/opto\/optical_sensor\/photosensor\/rpr-220.pdf\">极悦娱乐\u7684RPR-220\u5149\u53cd\u5c04\u5668<\/a>\u3002\u8fd9\u79cd\u5149\u53cd\u5c04\u5668\u7531LED\u548c\u6676\u4f53\u7ba1\u7ec4\u6210\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0b\u5b83\u4eec\u7684\u7279\u6027\u3002<\/p>\n<div id=\"attachment_8811\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8811\" class=\"size-full wp-image-8811\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-10.jpg\" alt=\"Rohm's RPR-220 Photo Reflector\" width=\"300\" height=\"222\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-10.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-10-197x146.jpg 197w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-10-50x37.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-10-101x75.jpg 101w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p id=\"caption-attachment-8811\" class=\"wp-caption-text\">RPR-220<\/p>\n<\/div>\n<p>\u9996\u5148\uff0cLED\u90e8\u5206\u7684\u7535\u538b\u548c\u7535\u6d41\u5206\u522b\u4e3a1.34V\u548c50mA\uff0c\u5149\u7535\u6676\u4f53\u7ba1\u90e8\u5206\u96c6\u7535\u6781\u7535\u6d41\u4e3a300mA\uff0c\u56e0\u6b64LED\u7535\u6e90\u9700\u8981\u4f7f\u75283.3V\u7684Raspberry Pi\u7535\u6e90\u5f15\u811a\uff0c\u8fde\u63a551\u03a9\u7684\u9650\u6d41\u7535\u963b\u5668\uff0c\u5e76\u4e0eLED\u90e8\u5206\u8fde\u63a5\u3002\u8fd9\u79cdLED\u7684\u5149\u662f\u7ea2\u5916\u5149\uff0c\u8089\u773c\u65e0\u6cd5\u76f4\u63a5\u770b\u5230\uff0c\u4f46\u4f7f\u7528\u6570\u7801\u76f8\u673a\u53ef\u4ee5\u5f88\u6e05\u695a\u5730\u770b\u5230\u5b83\u5728\u53d1\u5149\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8812\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11.jpg\" alt=\"Connect the Phototransistor to the GPIO\" width=\"400\" height=\"299\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11.jpg 400w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11-300x224.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11-195x146.jpg 195w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11-50x37.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-11-100x75.jpg 100w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>\u5149\u7535\u6676\u4f53\u7ba1\u90e8\u5206\u7684\u7535\u8def\u4e0e\u4e4b\u524d\u7684\u7535\u8def\u76f8\u540c\u3002\u8fd9\u6837\uff0c\u5c31\u53ef\u4ee5\u53d1\u6325\u4f20\u611f\u5668\u7684\u4f5c\u7528\u4e86\u3002\u6211\u4eec\u6682\u4e14\u5c1d\u8bd5\u4e86\u8ba9LED\u81ea\u884c\u70b9\u4eae\u3002\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u50cf\u4e4b\u524d\u4e00\u6837\uff0c\u5c1d\u8bd5\u8ba9\u7535\u673a\u8f6c\u8d77\u6765\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8813\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12.jpg\" alt=\"Connect the Phototransistor to the GPIO\" width=\"500\" height=\"397\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12-300x238.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12-184x146.jpg 184w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12-50x40.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-12-94x75.jpg 94w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u9762\u5305\u677f\u7ec4\u88c5\u793a\u610f\u5982\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8814\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13.jpg\" alt=\"assembled on a breadboard diagram\" width=\"300\" height=\"402\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13-224x300.jpg 224w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13-109x146.jpg 109w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13-37x50.jpg 37w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-13-56x75.jpg 56w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8815\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14.jpg\" alt=\"assembled on a breadboard\" width=\"400\" height=\"256\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14.jpg 400w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14-300x192.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14-228x146.jpg 228w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14-50x32.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-14-117x75.jpg 117w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>Scratch\u7a0b\u5e8f\u793a\u610f\u5982\u56fe\u5982\u4e0b\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8816\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15.jpg\" alt=\" scratch\" width=\"400\" height=\"344\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15.jpg 400w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15-300x258.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15-170x146.jpg 170w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15-50x43.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-15-87x75.jpg 87w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9aa4\u540e\uff0c\u5f53\u4f20\u611f\u5668\u524d\u9762\u6709\u4e1c\u897f\u65f6\uff0cLED\u5c31\u4f1a\u70b9\u4eae\u3002<\/p>\n<div id=\"attachment_8817\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8817\" class=\"size-full wp-image-8817\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16.jpg\" alt=\"LED lights up\" width=\"500\" height=\"329\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16-300x197.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16-222x146.jpg 222w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16-50x33.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/01\/sensor-input-experiment-16-114x75.jpg 114w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p id=\"caption-attachment-8817\" class=\"wp-caption-text\">\u770b\uff01LED\u70b9\u4eae\uff01<\/p>\n<\/div>\n<p>\u5728\u5149\u53cd\u5c04\u5668\u7684\u7ed3\u6784\u662f\u53d1\u5149\u5355\u5143\u548c\u5149\u63a5\u6536\u5355\u5143\u5206\u5f00\u914d\u7f6e\u5728\u5c01\u88c5\u5185\u90e8\u7684\u3002\u7531\u4e8e\u662f\u7528\u6765\u53cd\u5c04\u5149\u7684\u4ea7\u54c1\uff0c\u6240\u4ee5\u5982\u679c\u6709\u4ec0\u4e48\u4e1c\u897f\u4e0e\u5c01\u88c5\u7d27\u5bc6\u63a5\u89e6\uff0c\u5149\u63a5\u6536\u5355\u5143\u5c31\u65e0\u6cd5\u5f88\u597d\u5730\u63a5\u6536\u53cd\u5c04\u5149\u3002\u5bf9\u4e8eRPR-220\u6765\u8bf4\uff0c\u8ddd\u79bb\u5c01\u88c56mm\u4e3a\u5b9c\u3002\u56e0\u6b64\uff0c\u53ef\u80fd\u8bbe\u60f3\u521b\u5efa\u4e00\u4e9b\u901a\u8fc7\u73bb\u7483\u6216\u4e9a\u514b\u529b\u677f\u653e\u7f6e\u4ec0\u4e48\u4e1c\u897f\u7684\u9879\u76ee\u6bd4\u8f83\u597d\u3002<\/p>\n<h2>4. \u7ed3\u8bba<\/h2>\n<p>\u8fd9\u6b21\u6211\u4eec\u5c1d\u8bd5\u4e86\u4f20\u611f\u5668\u8f93\u5165\u5b9e\u9a8c\uff0c\u8fdb\u4e00\u6b65\u4e86\u89e3\u4e86\u901a\u8fc7\u7b80\u5355\u7684\u539f\u7406\u6765\u5904\u7406\u4f20\u611f\u5668\u7684\u65b9\u6cd5\u3002\u4f46\u6211\u4eec\u4e0d\u80fd\u5c31\u6b64\u6b62\u6b65\u3002\u6211\u5e0c\u671b\u7ee7\u7eed\u63a2\u7d22\u5177\u4f53\u5e94\u7528\uff0c\u5c1d\u8bd5\u505a\u6709\u8da3\u7684\u9879\u76ee\uff0c\u6216\u8005\u521b\u5efa\u4e00\u4e9b\u5b9e\u7528\u4ea7\u54c1\u3002\u5728\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4f1a\u8fd0\u7528\u8fc4\u4eca\u4e3a\u6b62\u6240\u5b66\u5230\u7684\u539f\u7406\u548c\u5de5\u4f5c\u673a\u5236\uff0c\u6765\u4ecb\u7ecd\u521b\u5efa\u5177\u4f53\u4f5c\u54c1\u7684\u6280\u672f\u548c\u8fc7\u7a0b\u3002<\/p>\n<p>\u867d\u7136\u901a\u8fc7\u5b9e\u9a8c\u6765\u9a8c\u8bc1\u539f\u7406\u548c\u5de5\u4f5c\u673a\u5236\u975e\u5e38\u91cd\u8981\uff0c\u4f46\u6211\u66f4\u671f\u671b\u5728\u4e0d\u65ad\u521b\u65b0\u7684\u540c\u65f6\uff0c\u80fd\u591f\u66f4\u591a\u5730\u601d\u8003\u5728\u54ea\u65b9\u9762\u53ef\u8fdb\u884c\u66f4\u6df1\u5165\u7684\u63a2\u7d22\uff0c\u4e0d\u65ad\u62d3\u5c55\u5e94\u7528\u8303\u56f4\u3002<\/p>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/micro.wfjydl.com\/deviceplus\/wp-content\/uploads\/2018\/08\/Device-Plus-logo-for-author-info-75x75.png\" width=\"64\" height=\"64\" alt=\"DevicePlus \u7f16\u8f91\u56e2\u961f\">\n\t<\/div>\n<div class=\"desc-wrapper\">\n<h5>DevicePlus \u7f16\u8f91\u56e2\u961f<\/h5>\n<div class=\"desc\">\n<p>\u8bbe\u5907\u5347\u7ea7\u7248\u9002\u7528\u4e8e\u6240\u6709\u70ed\u7231\u7535\u5b50\u548c\u673a\u7535\u4e00\u4f53\u5316\u7684\u4eba\u3002<\/p>\n<\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8eDevicePlus.com\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002 \u672c\u6587\u6700\u521d\u53d1\u5e03\u5728deviceplus.jp\u7f51\u7ad9\u4e0a\uff0c\u800c\u540e\u88ab\u7ffb\u8bd1\u6210\u82f1\u8bed\u3002 \u5728\u672c\u7cfb\u5217\u6587\u7ae0\u4e2d\uff0c\u4e3b\u8981\u662f\u901a\u8fc7\u4f7f\u7528Raspberry Pi\u521b\u5efa\u7684\u7b80\u5355\u9879\u76ee\u6765\u5b66\u4e60\u7535\u5b50\u8bbe\u8ba1\u7684\u539f\u7406\u548c [&hellip;]","protected":false},"author":1,"featured_media":19010,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1132],"tags":[],"class_list":["post-19009","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=19009"}],"version-history":[{"count":4,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19009\/revisions"}],"predecessor-version":[{"id":19014,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/19009\/revisions\/19014"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/19010"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=19009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=19009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=19009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}