{"id":9195,"date":"2021-05-27T00:00:24","date_gmt":"2021-05-26T15:00:24","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=9195"},"modified":"2024-11-14T14:29:51","modified_gmt":"2024-11-14T06:29:51","slug":"arduino%e5%9f%ba%e7%a1%80%ef%bc%9a%e9%80%9a%e8%bf%87%e6%95%b0%e5%ad%97%e8%be%93%e5%87%ba%e6%8e%a7%e5%88%b6led%e7%85%a7%e6%98%8e","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/how-tos\/arduino\/the-basics-of-arduino-control-led-lighting-with-digital-output","title":{"rendered":"Arduino\u57fa\u7840\uff1a\u901a\u8fc7\u6570\u5b57\u8f93\u51fa\u63a7\u5236LED\u7167\u660e"},"content":{"rendered":"<div class=\u201cthe_content_wrapper\u201d>\n\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\u4e3a\u82f1\u8bd1\u7248\uff0c\u539f\u6587\u53d1\u8868\u4e8e<a href=\"http:\/\/deviceplus.jp\" target=\"_blank\" rel=\"noopener noreferrer\">deviceplus.jp<\/a>\u3002<\/em><\/p>\n<p>\u867d\u7136Devices Plus\u5df2\u7ecf\u4ecb\u7ecd\u8fc7Arduino\u7684\u591a\u79cd\u5e94\u7528\u7a0b\u5e8f\u548c\u793a\u4f8b\uff0c\u4f46\u662f\u4e86\u89e3\u76f8\u5173\u57fa\u7840\u77e5\u8bc6\u5bf9\u4e8e\u4efb\u4f55\u9879\u76ee\u7684\u6784\u5efa\u4ecd\u7136\u662f\u975e\u5e38\u91cd\u8981\u7684\uff01<\/p>\n<p>\u8fd9\u6b21\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecdArduino\u7535\u5b50\u4ea7\u54c1\u7684\u57fa\u7840\u77e5\u8bc6\u3002\u4ee5\u7f16\u5199Arduino\u5165\u95e8\u4e66\u7c4d\u800c\u95fb\u540d\u7684\u798f\u7530\u548c\u5b8f\u5148\u751f\u5c06\u4f5c\u4e3a\u672c\u6587\u7684\u6307\u5bfc\u3002<\/p>\n<p>\u672c\u6587\u5c06\u4ecb\u7ecd\u53ef\u4ee5\u901a\u8fc7Arduino\u8fdb\u884c\u5f00\u542f\u548c\u5173\u95ed\u7684\u6570\u5b57\u8f93\u51fa\u7684\u6709\u5173\u5185\u5bb9\uff0c\u5e76\u4e14\u8bf4\u660e\u5982\u4f55\u521b\u5efa\u4f7f\u7528LED\u7684\u6570\u5b57\u8f93\u51fa\u7a0b\u5e8f\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u4e3a\u4e86\u4f7f\u7528\u7535\u5b50\u90e8\u4ef6\uff0c\u9700\u8981\u4e86\u89e3\u7535\u6c14\u7684\u6709\u5173\u672f\u8bed\uff0c\u4f8b\u5982\u201c\u7535\u538b\u201d\u548c\u201c\u7535\u6d41\u201d\u3002\u5982\u679c\u4e0d\u7406\u89e3\u8fd9\u4e9b\u672f\u8bed\u7684\u542b\u4e49\uff0c\u60a8\u5728\u8d2d\u4e70\u7535\u5b50\u5143\u4ef6\u7684\u65f6\u5019\u5c06\u65e0\u6cd5\u786e\u8ba4\u5176\u662f\u5426\u9002\u7528\u4e8e\u60a8\u7684\u7528\u9014\u3002<\/p>\n<p><strong>[\u76ee\u5f55]<\/strong><\/p>\n<ul>\n<li><strong>\u2022\tArduino\u4e0a\u7684\u63a5\u53e3<\/strong><\/li>\n<li><strong>\u2022\t\u201c\u6570\u5b57\u8f93\u51fa\u201d\u7684\u4e24\u79cd\u8f93\u51fa\u72b6\u6001<\/strong><\/li>\n<li><strong>\u2022\t\u901a\u8fc7\u7a0b\u5e8f\u70b9\u4eaeLED<\/strong><\/li>\n<li><strong>\u2022\t\u7a0b\u5e8f\u7ed3\u6784<\/strong><\/li>\n<li><strong>\u2022\t\u9700\u8981\u4e86\u89e3\u7684\u7535\u6c14\u672f\u8bed<\/strong><\/li>\n<li><strong>\u2022\t\u901a\u8fc7\u7535\u963b\u63a7\u5236\u7535\u6d41<\/strong><\/li>\n<li><strong>\u2022\t\u5c06LED\u4e0e\u7535\u963b\u8fde\u63a5\u5e76\u70b9\u4eaeLED<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Arduino\u4e0a\u7684\u63a5\u53e3<\/h2>\n<p>Arduino\u5177\u6709\u7c7b\u4f3c\u63d2\u5b54\u7684\u4e32\u8054\u5206\u5e03\u7684\u7aef\u5b50\uff0c\u4f5c\u4e3a\u8fde\u63a5\u548c\u63a7\u5236\u7535\u5b50\u7ec4\u4ef6\u7684\u63a5\u53e3\u3002\u8fd9\u4e9b\u63a5\u53e3\u53ef\u4ee5\u5b9e\u73b0\u591a\u79cd\u63a7\u5236\u529f\u80fd\uff0c\u4f8b\u5982\u5728\u8fd9\u91cc\u8fde\u63a5\u4e00\u4e2aLED\u6216\u7535\u673a\u6765\u5bf9\u7535\u5b50\u7ec4\u4ef6\u7684\u8fd0\u884c\u8fdb\u884c\u63a7\u5236\uff0c\u8fde\u63a5\u5f00\u5173\u6216\u7c7b\u4f3c\u7684\u63a7\u4ef6\u4ee5\u8fdb\u884c\u6253\u5f00\/\u5173\u95ed\u7684\u64cd\u4f5c\uff0c\u6216\u8fde\u63a5\u6e29\u5ea6\u4f20\u611f\u5668\u6765\u6d4b\u91cf\u5ba4\u6e29\u3002<\/p>\n<p>Arduino UNO\u7684\u9876\u90e8\u670914\u4e2a\uff080\u81f313\uff09\u201c\u6570\u5b57\u8f93\u5165\/\u8f93\u51fa\u201d\u7aef\u5b50\uff0c\u53f3\u4e0b\u65b9\u67096\u4e2a\uff08A0\u81f3A5\uff09\u201c\u6a21\u62df\u8f93\u5165\/\u8f93\u51fa\u201d\u7aef\u5b50\u3002<\/p>\n<p>\u6570\u5b57\u8f93\u5165\/\u8f93\u51fa\u7aef\u5b50\u7684\u8f93\u51fa\u5177\u6709\u4e24\u79cd\u72b6\u6001\uff1a\u201c\u9ad8\u7535\u5e73\u72b6\u6001\u201d\u548c\u201c\u4f4e\u7535\u5e73\u72b6\u6001\u201d\uff0c\u4ee5\u5b9e\u73b0\u5bf9\u7535\u5b50\u7ec4\u4ef6\u7684\u64cd\u4f5c\uff0c\u5e76\u4e14\u53ef\u4ee5\u68c0\u67e5\u7535\u538b\u72b6\u6001\u3002<\/p>\n<p>\u800c\u6a21\u62df\u8f93\u5165\u662f\u4e00\u4e2a\u53ef\u4ee5\u8f93\u5165\u8fde\u7eed\u53d8\u5316\u7535\u538b\u7684\u7aef\u5b50\u3002\u7ed9\u6bcf\u4e2a\u7aef\u5b50\u5206\u914d\u4e00\u4e2a\u6570\u5b57\u7f16\u53f7\uff0c\u5728\u901a\u8fc7\u7a0b\u5e8f\u63a7\u5236\u7535\u5b50\u7ec4\u4ef6\u65f6\u4f1a\u6307\u5b9a\u5176\u6570\u5b57\u7f16\u53f7\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8710\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1.jpg\" alt=\"digital input\/output terminal\" width=\"500\" height=\"562\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1-267x300.jpg 267w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1-130x146.jpg 130w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1-44x50.jpg 44w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-1-67x75.jpg 67w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<h2>\u201c\u6570\u5b57\u8f93\u51fa\u201d\u7684\u4e24\u79cd\u8f93\u51fa\u72b6\u6001<\/h2>\n<p>\u6570\u5b57\u8f93\u51fa\u662f\u4e00\u79cd\u53ef\u4ee5\u66f4\u6539\u7a0b\u5e8f\u4e2d\u6bcf\u4e2a\u5f15\u811a\u72b6\u6001\u7684\u63a5\u53e3\u3002\u60a8\u53ef\u4ee5\u5728\u4e24\u79cd\u72b6\u6001\u4e4b\u95f4\u8fdb\u884c\u5207\u6362\uff1a\u201c\u9ad8\u7535\u5e73\u201d\u6216\u201c\u4f4e\u7535\u5e73\u201d\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8fde\u63a5LED\u4e14\u7535\u538b\u662f\u9ad8\u7535\u5e73\uff0c\u90a3\u4e48LED\u5c06\u4f1a\u88ab\u70b9\u4eae\u3002\u76f8\u53cd\uff0c\u5982\u679c\u662f\u4f4e\u7535\u5e73\uff0c\u5219LED\u4f1a\u7184\u706d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8711\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2.jpg\" alt=\"digital output\" width=\"500\" height=\"314\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2-300x188.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2-232x146.jpg 232w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2-50x31.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-2-119x75.jpg 119w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u5728Arduino\u4e2d\uff0c\u5f53\u7535\u538b\u662f\u9ad8\u7535\u5e73\u65f6\uff0c\u7aef\u5b50\u7535\u538b\u4e3a\u201c5V\u201d\uff0c\u662f\u4f4e\u7535\u5e73\u65f6\uff0c\u7aef\u5b50\u7535\u538b\u5207\u6362\u4e3a\u201c0V\u201d\u3002\u9ad8\u7535\u538b\u72b6\u6001\u88ab\u79f0\u4e3a\u201c\u9ad8\u7535\u5e73\u201d\uff0c\u4f4e\u7535\u538b\u72b6\u6001\u88ab\u79f0\u4e3a\u201c\u4f4e\u7535\u5e73\u201d\u3002\u5728\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u201cHIGH\u201d\u548c\u201cLOW\u201d\u6765\u5206\u522b\u6307\u5b9a\u9ad8\u7535\u5e73\u548c\u4f4e\u7535\u5e73\u3002\u6570\u5b57\u8f93\u5165\u548c\u6a21\u62df\u8f93\u5165\u5c06\u5728\u672c\u7cfb\u5217\u7684\u540e\u9762\u90e8\u5206\u5185\u5bb9\u4e2d\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n<h2>\u901a\u8fc7\u7a0b\u5e8f\u70b9\u4eaeLED<\/h2>\n<p>\u6211\u4eec\u901a\u8fc7\u7528\u7a0b\u5e8f\u63a7\u5236\u6570\u5b57\u8f93\u51fa\u6765\u6253\u5f00LED\u3002\u672c\u8282\u5c06\u4ecb\u7ecd\u5982\u4f55\u6253\u5f00\u8fde\u63a5\u5230\u7b2c13\u4e2a\u6570\u5b57\u8f93\u5165\/\u8f93\u51fa\u7aef\u5b50\u7684LED\u3002\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u521b\u5efa\u7a0b\u5e8f\u3002\u521b\u5efa\u7a0b\u5e8f\u540e\uff0c\u50cf\u4e4b\u524d\u4ecb\u7ecd\u7684\u90a3\u6837\u5c06\u5176\u5199\u5165Arduino\uff0c\u7136\u540e\u68c0\u67e5LED\u662f\u5426\u88ab\u70b9\u4eae\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>\tconst int LED_PIN = 13\r\n\t\r\n\r\n\tvoid setup(){\r\n\t    pinMode( LED_PIN, OUTPUT );\r\n\t}\r\n\t\r\n\r\n\tvoid loop(){\r\n\t    digitalWrite( LED_PIN, HIGH );\r\n\t}\r\n<\/code><\/pre>\n<\/div>\n<p>view rawcode01.ino hosted with &#x2764; by GitHub<\/p>\n<p>\u5f53\u5bf9\u6570\u5b57\u8f93\u51fa\u8fdb\u884c\u63a7\u5236\u65f6\uff0c\u7b2c4\u884c\u548c\u7b2c8\u884c\u7684\u5185\u5bb9\u975e\u5e38\u91cd\u8981\u3002\u6570\u5b57\u8f93\u5165\/\u8f93\u51fa\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a\u53ef\u4ee5\u6539\u53d8\u7aef\u5b50\u72b6\u6001\u7684\u201c\u6570\u5b57\u8f93\u51fa\u201d\u4ee5\u53ca\u53ef\u4ee5\u8bfb\u53d6\u7aef\u5b50\u72b6\u6001\u7684\u201c\u6570\u5b57\u8f93\u5165\u201d\u3002\u56e0\u6b64\uff0c\u5fc5\u987b\u9884\u5148\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u8bbe\u7f6e\u3002\u8be5\u8bbe\u7f6e\u7684\u5185\u5bb9\u5c31\u662f\u7b2c4\u884c\u7684\u201cpinMode ()\u201d\u3002<br \/>\n<em>pinMode( LED_PIN, OUTPUT );<\/em><br \/>\n\u5728pinMode ()\u7684\u62ec\u53f7\u4e2d\u8f93\u5165\u76ee\u6807\u5f15\u811a\u7f16\u53f7\u4ee5\u53ca\u6a21\u5f0f\u3002\u672c\u9879\u76ee\u4e2d\u4f7f\u7528\u4e86\u7b2c13\u4e2a\u7aef\u5b50\uff0c\u6240\u4ee5\u76ee\u6807\u7aef\u5b50\u7f16\u53f7\u4e3a\u201c13\u201d\uff0c\u5982\u679c\u4f7f\u7528\u7684\u662f\u6570\u5b57\u8f93\u51fa\u6a21\u5f0f\uff0c\u5219\u8f93\u5165\u201cOUTPUT\u201d\u3002\u4f46\u662f\uff0c\u7531\u4e8e\u672c\u9879\u76ee\u4e2d\u5c06\u7aef\u5b50\u7f16\u53f7\u8bbe\u7f6e\u4e3a\u201cLED_PIN\u201d\uff0c\u6240\u4ee5\u5c06\u76ee\u6807\u7aef\u5b50\u7f16\u53f7\u6307\u5b9a\u4e3a\u201cLED_PIN\u201d\uff08\u7a0d\u540e\u89e3\u91ca\uff09\u3002<\/p>\n<p>\u901a\u8fc7\u7b2c8\u884c\u4e0a\u7684\u201cdigitalWrite ()\u201d\u66f4\u6539\u8f93\u51fa\u3002<br \/>\n<em>digitalWrite( LED_PIN, HIGH );<\/em><br \/>\n\u6307\u5b9a\u6240\u8981\u66f4\u6539\u8f93\u51fa\u7684\u7aef\u5b50\u7f16\u53f7\u4ee5\u53ca\u7aef\u5b50\u8f93\u51fa\u7684\u72b6\u6001\u3002\u5f15\u811a\u7f16\u53f7\u6307\u5b9a\u4e3a\u548cpinMode ()\u4e2d\u4e00\u6837\u7684\u201cLED_PIN\u201d\u3002\u5982\u679c\u7aef\u5b50\u72b6\u6001\u88ab\u6307\u5b9a\u4e3a\u201cHIGH\u201d\uff0c\u5c06\u4f1a\u8f93\u51fa5V\u7684\u7535\u538b\u3002\u5982\u679c\u60a8\u8fde\u63a5\u4e86\u4e00\u4e2aLED\uff0c\u90a3\u4e48\u5c06\u4f1a\u4ea7\u751f\u7535\u6d41\uff0cLED\u4f1a\u4eae\u8d77\u3002\u5982\u679c\u8981\u5173\u95edLED\uff0c\u8bf7\u5c06\u72b6\u6001\u6307\u5b9a\u4e3a\u201cLOW\u201d\uff0c\u4f7f\u7aef\u5b50\u7535\u538b\u53d8\u4e3a0\u3002<\/p>\n<h2>\u7a0b\u5e8f\u7ed3\u6784<\/h2>\n<p>\u672c\u8282\u5c06\u4f1a\u4ecb\u7ecd\u7a0b\u5e8f\u4e2d\u6570\u5b57\u8f93\u51fa\u4ee5\u5916\u7684\u5185\u5bb9\u3002\u4ee5\u4e0b\u6240\u793a\u7684\u7b2c\u4e00\u884c\u4ee3\u7801\u5c06\u7535\u5b50\u7ec4\u4ef6\u6240\u8fde\u63a5\u7684\u7aef\u5b50\u7f16\u53f7\u8fdb\u884c\u4e86\u547d\u540d\u3002<br \/>\n<em>const int LED_PIN = 13<\/em><br \/>\n\u5c06\u7535\u5b50\u7ec4\u4ef6\u8fde\u63a5\u5230Arduino\u7684\u63a5\u53e3\u88ab\u8fdb\u884c\u4e86\u7f16\u53f7\u3002\u4f8b\u5982\uff0c\u5c06\u201c13\u201d\u5206\u914d\u7ed9\u4e86\u4e0a\u6b21\u8fde\u63a5\u4e86\u5916\u90e8LED\u7684\u7aef\u5b50\u3002\u5728\u5b9e\u9645\u63a7\u5236LED\u65f6\uff0c\u5fc5\u987b\u5728\u7a0b\u5e8f\u4e2d\u6307\u5b9a\u6240\u8fde\u63a5\u7684\u63a5\u53e3\u7f16\u53f7\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u76f4\u63a5\u5728\u7a0b\u5e8f\u4e2d\u8f93\u5165\u6570\u5b57\uff0c\u5c06\u5f88\u96be\u5206\u6e05\u6570\u5b57\u7684\u542b\u4e49\uff0c\u5e76\u4e14\u5982\u679c\u60a8\u4e4b\u540e\u5bf9\u7a0b\u5e8f\u8fdb\u884c\u4e86\u4fee\u6539\uff0c\u5c31\u8981\u82b1\u8d39\u66f4\u591a\u7684\u65f6\u95f4\u6765\u7814\u7a76\u8fd9\u4e9b\u6570\u5b57\u3002\u53e6\u5916\uff0c\u5982\u679c\u66f4\u6539\u4e86\u8fde\u63a5\u7684\u5bf9\u8c61\uff0c\u5c31\u9700\u8981\u5728\u7a0b\u5e8f\u4e2d\u6240\u6709\u6307\u5b9a\u63a5\u53e3\u7f16\u53f7\u7684\u4f4d\u7f6e\u8fdb\u884c\u66f4\u6539\uff0c\u8fd9\u975e\u5e38\u8017\u65f6\uff0c\u5e76\u4e14\u6709\u53ef\u80fd\u9020\u6210\u5176\u4ed6\u90e8\u5206\u88ab\u610f\u5916\u66f4\u6539\uff0c\u4ece\u800c\u5bfc\u81f4\u6545\u969c\u7684\u53d1\u751f\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u6700\u597d\u4e3a\u7535\u5b50\u90e8\u4ef6\u6240\u8fde\u63a5\u7684\u63a5\u53e3\u7f16\u53f7\u6307\u5b9a\u4e3a\u4e00\u4e2a\u63cf\u8ff0\u6027\u7684\u540d\u79f0\u3002\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u6307\u5b9a\u4e86\u201cLED_PIN\u201d\uff08\u53d8\u91cf\u540d\uff09\u7684\u540d\u79f0\uff0c\u5e76\u4e14\u5728\u53d8\u91cf\u4e2d\u5b58\u50a8\u4e86\u201c13\u201d\u3002\u4e4b\u540e\uff0c\u5982\u679c\u60f3\u8981\u5bf9LED\u8fdb\u884c\u63a7\u5236\uff0c\u8f93\u5165\u201cLED_PIN\u201d\u5373\u53ef\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u53d8\u91cf\u540d\u524d\u9762\u7684\u201cint\u201d\u8868\u793a\u53d8\u91cf\u4e3a\u6574\u578b\uff0c\u201cconst\u201d\u53ef\u4ee5\u9632\u6b62\u7a0b\u5e8f\u4e2d\u7684\u53d8\u91cf\u5185\u5bb9\u88ab\u66f4\u6539\u3002<\/p>\n<p>\u5982\u4e0b\u6240\u793a\u7684\u7b2c3\u884c\u5230\u7b2c5\u884c\u4e3asetup ()\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u4ec5\u88ab\u6267\u884c\u4e00\u6b21\u3002<br \/>\n<em>void setup() {<\/em><br \/>\n<em>\uff1a<\/em><br \/>\n<em>}<\/em><br \/>\nArduino\u5f00\u542f\u540e\uff0c\u5c06\u6839\u636e\u5176\u4e2d\u7684\u7a0b\u5e8f\u6267\u884c\u8be5\u51fd\u6570\u3002\u672c\u9879\u76ee\u4e2d\u7684setup ()\u51fd\u6570\u4e2d\u7684\u7a0b\u5e8f\u4ec5\u88ab\u6267\u884c\u4e00\u6b21\u3002\u56e0\u6b64\uff0csetup ()\u88ab\u7528\u4e8e\u521d\u59cb\u8bbe\u7f6e\u3002\u8be5\u7a0b\u5e8f\u7528\u4e8e\u8bbe\u7f6e\u6570\u5b57\u8f93\u5165\/\u8f93\u51fa\u7aef\u5b50\u7684\u6a21\u5f0f\u3002<\/p>\n<p>\u5982\u4e0b\u6240\u793a\u7684\u7b2c7\u884c\u5230\u7b2c9\u884c\u4e3aloop ()\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u5c06\u88ab\u91cd\u590d\u6267\u884c\u3002<br \/>\n<em>void loop(){<\/em><br \/>\n<em>\uff1a<\/em><br \/>\n<em>}<\/em><br \/>\nsetup ()\u51fd\u6570\u4e2d\u7684\u7a0b\u5e8f\u88ab\u6267\u884c\u540e\uff0c\u5c06\u5f00\u59cb\u6267\u884cloop ()\u51fd\u6570\u3002\u5f53\u7a0b\u5e8f\u8fd0\u884c\u5230loop ()\u51fd\u6570\u7684\u7ed3\u5c3e\u65f6\uff0c\u5c06\u4f1a\u8fd4\u56de\u5230loop ()\u7684\u5f00\u5934\u518d\u6b21\u8fd0\u884c\u3002\u7a0b\u5e8f\u7684\u4e3b\u4f53\u5185\u5bb9\uff08\u5982LED\u7167\u660e\u548c\u7535\u673a\u63a7\u5236\uff09\u5c06\u4f1a\u5728\u8fd9\u91cc\u8fdb\u884c\u63cf\u8ff0\u3002\u5728\u8be5\u7a0b\u5e8f\u4e2d\uff0c\u53ef\u4ee5\u5bf9\u6570\u5b57\u8f93\u51fa\u8fdb\u884c\u5207\u6362\u4ece\u800c\u70b9\u4eaeLED\u3002<\/p>\n<h2>\u9700\u8981\u4e86\u89e3\u7684\u7535\u6c14\u672f\u8bed<\/h2>\n<p>\u73b0\u5728\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e9b\u7535\u6c14\u672f\u8bed\u7684\u57fa\u672c\u542b\u4e49\u3002\u5f53\u60a8\u6311\u9009\u7535\u5b50\u5143\u4ef6\u6216\u8005\u4f7f\u7528\u7535\u5b50\u5143\u4ef6\u65f6\uff0c\u5bf9\u7535\u6c14\u672f\u8bed\u6709\u4e00\u5b9a\u4e86\u89e3\u4f1a\u5e2e\u52a9\u60a8\u8fdb\u884c\u7684\u66f4\u52a0\u987a\u5229\u3002\u7b2c\u4e00\u4e2a\u8981\u77e5\u9053\u7684\u7535\u6c14\u672f\u8bed\u662f\u201c\u7535\u6d41\u201d\u3002<\/p>\n<p>\u91d1\u5c5e\u4e2d\u5b58\u5728\u4e00\u79cd\u88ab\u79f0\u4e3a\u201c\u6b63\u7535\u8377\u201d\u7684\u6b63\u9759\u7535\u3002\u9759\u7535\u8fd9\u4e00\u6982\u5ff5\u5f88\u96be\u7406\u89e3\uff0c\u6211\u4eec\u53ef\u4ee5\u628a\u6b63\u7535\u8377\u89c6\u4f5c\u5e26\u6709\u6b63\u7535\u8377\u7684\u7c92\u5b50\uff0c\u5982\u56fe\u6240\u793a\u3002<br \/>\n\u8fd9\u4e9b\u6b63\u7535\u8377\u7531\u7535\u6c60\u6216\u5176\u4ed6\u7535\u6e90\u4ea7\u751f\uff0c\u7a7f\u8fc7\u5bfc\u4f53\uff0c\u7136\u540e\u6d41\u5165\u7535\u5b50\u7ec4\u4ef6\uff08\u5982LED\uff09\u3002\u201c\u7535\u6d41\u201d\u8868\u793a\u5728\u91d1\u5c5e\u4e2d\u6d41\u52a8\u7684\u6b63\u7535\u8377\u91cf\u3002\u5982\u679c\u6709\u5927\u91cf\u6b63\u7535\u8377\u6d41\u8fc7\uff0c\u5219LED\u7b49\u7535\u5b50\u90e8\u4ef6\u5c31\u80fd\u591f\u83b7\u53d6\u5927\u91cf\u7684\u7535\u80fd\uff08\u80fd\u91cf\uff09\uff0c\u5149\u7167\u5f3a\u5ea6\u66f4\u5927\u3002\u76f8\u53cd\uff0c\u5982\u679c\u7535\u6d41\u8f83\u5c0f\uff0c\u90a3\u4e48\u4f9b\u7ed9\u7684\u6b63\u7535\u8377\u5c31\u8f83\u5c11\uff0c\u5728\u4f7f\u7528LED\u65f6\uff0c\u5149\u7167\u5f3a\u5ea6\u5c06\u4f1a\u66f4\u5f31\u3002<\/p>\n<p>\u7535\u6d41\u7684\u5355\u4f4d\u662f\u201cA\u201d\uff08\u5b89\u57f9\uff09\u3002<\/p>\n<p>\u9664\u6b64\u4e4b\u5916\uff0c\u5e26\u8d1f\u7535\u7684\u7535\u8377\u88ab\u79f0\u4e3a\u201c\u8d1f\u7535\u8377\u201d\uff0c\u4f46\u662f\uff0c\u5728\u7535\u5b50\u7535\u8def\u4e2d\uff0c\u6211\u4eec\u901a\u5e38\u5c06\u6b63\u7535\u8377\u5728\u7535\u8def\u4e2d\u7684\u79fb\u52a8\u65b9\u5411\u4f5c\u4e3a\u7535\u6d41\u65b9\u5411\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8712\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3.jpg\" alt=\"electronic circuit\" width=\"500\" height=\"295\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3-300x177.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3-247x146.jpg 247w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3-50x30.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-3-127x75.jpg 127w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u9700\u8981\u4e86\u89e3\u7684\u53e6\u4e00\u4e2a\u7535\u6c14\u672f\u8bed\u662f\u201c\u7535\u538b\u201d\u3002\u91d1\u5c5e\u4e2d\u7684\u6b63\u7535\u8377\u662f\u7535\u529b\u7684\u6765\u6e90\u3002\u6b63\u7535\u8377\u53ef\u4ee5\u5728\u7535\u573a\u529b\u7684\u4f5c\u7528\u4e0b\u8fdb\u884c\u79fb\u52a8\u3002\u8fd9\u79cd\u53ef\u4ee5\u79fb\u52a8\u6b63\u7535\u8377\u7684\u529b\u88ab\u79f0\u4e3a\u201c\u7535\u538b\u201d\u3002\u5982\u679c\u7535\u538b\u5f88\u5927\uff0c\u5c31\u53ef\u4ee5\u9a71\u52a8\u66f4\u591a\u7684\u6b63\u7535\u8377\u79fb\u52a8\uff0c\u4ece\u800c\u4ea7\u751f\u66f4\u5927\u7684\u7535\u6d41\u3002\u800c\u5982\u679c\u7535\u538b\u8f83\u5c0f\uff0c\u90a3\u4e48\u79fb\u52a8\u7684\u6b63\u7535\u8377\u6570\u91cf\u4e5f\u4f1a\u8f83\u5c11\uff0c\u56e0\u6b64\u4ea7\u751f\u7684\u7535\u6d41\u8f83\u5c0f\u3002<\/p>\n<p>\u7535\u538b\u7684\u5355\u4f4d\u662f\u201cV\uff08\u4f0f\u7279\uff09\u201d\u3002<\/p>\n<p>\u7535\u6c60\u53ef\u4ee5\u63d0\u4f9b1.5V\u7684\u7535\u538b\uff0cArduino\u7684\u7535\u6e90\u7aef\u5b50\u53ef\u4ee5\u63d0\u4f9b5V\u7684\u7535\u538b\uff0c\u5bb6\u7528\u7535\u6e90\u53ef\u4ee5\u63d0\u4f9b120V\u7684\u7535\u538b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8713\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4.jpg\" alt=\"electrical currents\" width=\"700\" height=\"625\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4-300x268.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4-164x146.jpg 164w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4-50x45.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-4-84x75.jpg 84w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>\u901a\u8fc7\u7535\u963b\u63a7\u5236\u7535\u6d41<\/h2>\n<p>\u8bb8\u591a\u7535\u5b50\u7ec4\u4ef6\u90fd\u5177\u6709\u53ef\u627f\u53d7\u7684<a href=\"https:\/\/www.deviceplus.com\/others\/glossary\/maximum-current-flow-to-motor\/\">\u6700\u5927\u7535\u6d41<\/a>\u503c\uff0c\u5982\u679c\u901a\u8fc7\u7684\u7535\u6d41\u8d85\u8fc7\u4e86\u8fd9\u4e2a\u503c\uff0c\u7535\u5b50\u7ec4\u4ef6\u4f1a\u53d1\u751f\u635f\u574f\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6d41\u7ecfLED\u7684\u7535\u6d41\u8d85\u8fc7\u4e86LED\u53ef\u4ee5\u627f\u53d7\u7684\u6781\u9650\u503c\uff0c\u90a3\u4e48LED\u53ef\u80fd\u4f1a\u5192\u51fa\u70df\u96fe\u6216\u8005\u53d1\u70ed\u81f3\u7834\u88c2\u3002\u635f\u574f\u7684LED\u5c06\u4f1a\u65e0\u6cd5\u4f7f\u7528\u3002\u89e6\u6478\u70ed\u7684LED\u8fd8\u6709\u70e7\u4f24\u7684\u5371\u9669\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u5bf9\u6d41\u7ecf\u7535\u5b50\u7ec4\u4ef6\u7684\u7535\u6d41\u8fdb\u884c\u8c03\u6574\u5f88\u91cd\u8981\u3002\u7535\u963b\u5668\u7684\u4f5c\u7528\u662f\u9650\u6d41\u3002\u7535\u963b\u5668\u662f\u53ef\u4ee5\u963b\u6b62\u7535\u6d41\u6d41\u52a8\uff0c\u5e76\u4e14\u963b\u788d\u6b63\u7535\u8377\u6d41\u5165\u5176\u5185\u90e8\u7684\u7535\u5b50\u5143\u4ef6\u3002\u56e0\u4e3a\u7535\u963b\u5668\u6291\u5236\u4e86\u7535\u6d41\uff0c\u6240\u4ee5\u6d41\u7ecf\u7535\u5b50\u7ec4\u4ef6\u7684\u7535\u6d41\u91cf\u51cf\u5c11\u4e86\uff0c\u7535\u5b50\u7ec4\u4ef6\u5c31\u53ef\u4ee5\u5b89\u5168\u5730\u8fdb\u884c\u5de5\u4f5c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8714\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5.jpg\" alt=\"resistance value\" width=\"500\" height=\"420\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5-300x252.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5-174x146.jpg 174w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5-50x42.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-5-89x75.jpg 89w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u7535\u963b\u5668\u5bf9\u6b63\u7535\u8377\u6d41\u52a8\u7684\u6291\u5236\u7a0b\u5ea6\u7528\u201c\u7535\u963b\u503c\u201d\u6765\u8868\u793a\u3002\u7535\u963b\u503c\u8d8a\u5c0f\uff0c\u6d41\u52a8\u7684\u6b63\u7535\u8377\u91cf\u5c31\u8d8a\u591a\uff0c\u7535\u6d41\u8d8a\u5927\u3002\u53cd\u4e4b\uff0c\u5982\u679c\u7535\u963b\u503c\u8f83\u5927\uff0c\u90a3\u4e48\u7535\u6d41\u5c31\u4f1a\u66f4\u5c0f\u3002\u7535\u963b\u503c\u7684\u5355\u4f4d\u4e3a\u201c\u03a9\uff08\u6b27\u59c6\uff09\u201d\u3002\u7535\u963b\u503c\u3001\u7535\u538b\u548c\u7535\u6d41\u4e4b\u95f4\u7684\u5173\u7cfb\u53ef\u4ee5\u7528\u201c\u6b27\u59c6\u5b9a\u5f8b\u201d\u7684\u516c\u5f0f\u6765\u8868\u793a\u3002\u5f53\u7535\u538b\u65bd\u52a0\u5230\u5177\u6709\u56fa\u5b9a\u7535\u963b\u503c\u7684\u7535\u963b\u5668\u4e24\u7aef\u65f6\uff0c\u5c06\u7535\u538b\u9664\u4ee5\u7535\u963b\u503c\u5c31\u53ef\u4ee5\u5f97\u5230\u6d41\u7ecf\u7684\u7535\u6d41\u503c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8715\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6.jpg\" alt=\"resistance value\" width=\"500\" height=\"164\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6.jpg 500w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6-300x98.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6-260x85.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6-50x16.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-6-150x49.jpg 150w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u5c061k\u03a9\u7535\u963b\u8fde\u63a5\u5230Arduino\u76845V\u7aef\u5b50\u4e0a\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u516c\u5f0f\u8ba1\u7b97\u7535\u6d41\u91cf\u30021k\u03a9 \u662f1000\u03a9\u3002<br \/>\n<em>5V \u00f7 1000\u03a9 = 0.005A = 5mA<\/em><\/p>\n<p>\u5982\u679c\u6d41\u7ecf\u7535\u5b50\u7ec4\u4ef6\u7684\u7535\u6d41\u503c\u6052\u5b9a\uff0c\u60a8\u5c31\u53ef\u4ee5\u8ba1\u7b97\u51fa\u6240\u8fde\u63a5\u7535\u963b\u5668\u7684\u7535\u963b\u503c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u7528\u65bd\u52a0\u7684\u7535\u538b\u503c\u9664\u4ee5\u6d41\u7ecf\u7684\u7535\u6d41\u503c\u5c31\u53ef\u4ee5\u5f97\u5230\u7535\u963b\u503c\u3002\u4f8b\u5982\uff0c\u8981\u5728\u65bd\u52a05V\u7535\u538b\u7684\u540c\u65f6\u65bd\u52a010mA\u7684\u7535\u6d41\uff0c\u4f7f\u7528\u4ee5\u4e0b\u516c\u5f0f\u5f97\u5230\u6240\u8fde\u63a5\u7535\u963b\u5668\u7684\u7535\u963b\u503c\u300210mA\u662f0.01A\u3002<\/p>\n<p><em>5V \u00f7 0.01A = 500\u03a9<\/em><\/p>\n<p>\u60a8\u53ef\u4ee5\u5728\u6b64\u5904\u83b7\u53d6\u6709\u5173\u6b27\u59c6\u5b9a\u5f8b\u7684\u66f4\u591a\u4fe1\u606f\uff1aLearn About Ohm\u2019s law, GPIO, and transistors by simple LED circuit on Raspberry Pi\uff08\u901a\u8fc7Raspberry Pi\u4e0a\u7684\u7b80\u5355LED\u7535\u8def\u4e86\u89e3\u6b27\u59c6\u5b9a\u5f8b\u3001GPIO\u548c\u6676\u4f53\u7ba1\uff09\u3002<\/p>\n<p>\u7535\u963b\u5668\u7684\u4fa7\u9762\u5370\u67094\u4e2a\u62165\u4e2a\u8272\u5e26\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u8272\u5e26\u77e5\u9053\u5176\u7535\u963b\u503c\u3002\u8272\u5e26\u7684\u542b\u4e49\u5982\u4e0b\u8868\u6240\u793a\u3002\u7b2c\u4e00\u4e2a\u548c\u7b2c\u4e8c\u4e2a\u6570\u5b57\u7ec4\u5408\u8d77\u6765\u662f\u4e00\u4e2a\u4e24\u4f4d\u6570\u7684\u6570\u5b57\uff0c\u7b2c\u4e09\u4e2a\u6570\u5b57\u662f\u500d\u6570\uff0c\u7b2c\u56db\u4e2a\u8868\u793a\u7684\u662f\u7535\u963b\u8bef\u5dee\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8716\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7.jpg\" alt=\"resistor has color bands\" width=\"700\" height=\"460\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7-300x197.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7-222x146.jpg 222w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7-50x33.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-7-114x75.jpg 114w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>\u4f8b\u5982\uff0c\u5370\u6709\u201cBrown Black Red Gold\uff08\u68d5\u8272 \u9ed1\u8272 \u7ea2\u8272 \u91d1\u8272\uff09\u201d\u7684\u7535\u963b\u5668\u7684\u7535\u963b\u503c\u662f1 k\u03a9\u3002<\/p>\n<h2>\u5c06LED\u4e0e\u7535\u963b\u8fde\u63a5\u5e76\u70b9\u4eaeLED<\/h2>\n<p>\u4f7f\u7528LED\u65f6\uff0c\u5fc5\u987b\u8fde\u63a5\u9002\u5f53\u7684\u7535\u963b\u5668\u6765\u70b9\u4eaeLED\u3002\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684\u8ba1\u7b97\u77e5\u9053\u9700\u8981\u8fde\u63a5\u591a\u5c11\u963b\u503c\u7684\u7535\u963b\u5668\u3002\u5f53LED\u548c\u7535\u963b\u5668\u4e32\u8054\u8fde\u63a5\u5e76\u4e14\u4e24\u7aef\u8fde\u63a5\u4e86\u7535\u6e90\u65f6\uff0c\u7535\u963b\u503c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u516c\u5f0f\u8ba1\u7b97\u5f97\u5230\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8717\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8.jpg\" alt=\"power supply is connected\" width=\"700\" height=\"300\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8.jpg 700w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8-300x129.jpg 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8-260x111.jpg 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8-50x21.jpg 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2019\/11\/arduino-control-LED-8-150x64.jpg 150w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>\u7535\u6e90\u7535\u538b\u5373\u4e3a\u6240\u8fde\u63a5\u7535\u6c60\u7684\u7535\u6e90\u7535\u538b\u3002\u8fde\u63a5\u5230Arduino\u7684\u6570\u5b57\u8f93\u51fa\u65f6\uff0c\u5c06\u9ad8\u7535\u5e73\u72b6\u6001\u4e0b\u8f93\u51fa\u76845V\u4f5c\u4e3a\u7535\u6e90\u7535\u538b\u3002\u5bf9\u4e8e\u6d41\u7ecfLED\u7684\u7535\u6d41\u548c\u7535\u538b\uff0c\u4f7f\u7528\u7535\u5b50\u5143\u4ef6\u9500\u552e\u70b9\u548c\u6570\u636e\u624b\u518c\u4e0a\u6240\u63d0\u4f9b\u7684\u201c\u6b63\u5411\u7535\u538b\uff08VF\uff09\u201d\u503c\u548c\u201c\u6b63\u5411\u7535\u6d41\uff08IF\uff09\u201d\u503c\u3002\u5982\u679c\u5c06\u6d41\u7ecfLED\u7684\u7535\u6d41\u8bbe\u7f6e\u4e3a\u6b63\u5411\u7535\u6d41\u503c\uff0c\u90a3\u4e48\u5176\u4e24\u7aef\u7684\u7535\u538b\u5373\u4e3a\u6b63\u5411\u7535\u538b\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f7f\u7528\u4e86\u7ea2\u8272LED\u201cSLR-56VC3F\u201d\uff0c\u6b63\u5411\u7535\u538b\u662f2V\uff08\u5149\u7535\u7279\u6027\u4e2d\u7684\u6b63\u5411\u7535\u538bVf\u9879\uff09\uff0c\u6b63\u5411\u7535\u6d41\u662f10mA\uff08\u5149\u7535\u7279\u6027\u4e2d\u7684If\u9879\uff09\u3002\u5c06\u8be5\u503c\u4f5c\u4e3a\u201cLED\u7535\u538b\u201d\u548c\u201cLED\u7535\u6d41\u201d\u8fdb\u884c\u8ba1\u7b97\u3002\u5982\u679c\u7535\u6e90\u7535\u538b\u662f5V\uff0cLED\u7535\u538b\u662f2V\uff0c\u7535\u6d41\u662f10mA\uff0c\u90a3\u4e48\u5982\u4e0b\u6240\u793a\uff0c\u5f97\u5230\u7684\u7535\u963b\u503c\u4e3a\u201c300\u03a9\u201d\u3002<\/p>\n<p><em>(5V \u2013 2V) \u00f7 0.01A = 300\u03a9<\/em><\/p>\n<p>\u53e6\u5916\uff0c\u5982\u679c\u60a8\u60f3\u8981\u5c06LED\u706f\u8c03\u6697\uff0c\u53ef\u4ee5\u51cf\u5c0f\u7535\u6d41\u503c\u3002\u9274\u4e8eLED\u7535\u538b\u51e0\u4e4e\u4e0d\u4f1a\u53d1\u751f\u6539\u53d8\uff0c\u6240\u4ee5\u4ecd\u7136\u4f7f\u7528\u6b63\u5411\u7535\u538b\u503c\u3002\u4f8b\u5982\uff0c\u5f53\u6d41\u7ecf\u7535\u6d41\u4e3a1 mA\u65f6\uff0c\u8ba1\u7b97\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<p><em>(5V \u2013 2V) \u00f7 0.001A = 3000\u03a9 = 3k\u03a9<\/em><\/p>\n<p>\u6211\u4eec\u5c06\u5177\u6709\u8ba1\u7b97\u5f97\u5230\u7684\u7535\u963b\u503c\u7684\u7535\u963b\u5668\u4e0eLED\u8fde\u63a5\u3002\u5982\u679c\u65e0\u6cd5\u83b7\u53d6\u4e0e\u8ba1\u7b97\u5f97\u5230\u7684\u7535\u963b\u503c\u5b8c\u5168\u4e00\u81f4\u7684\u7535\u963b\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u963b\u503c\u76f8\u8fd1\u7684\u7535\u963b\u5668\u3002<\/p>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8bb2\u89e3\u4e86\u6570\u5b57\u8f93\u51fa\u65b9\u5f0f\u3001\u7535\u538b\u4ee5\u53ca\u7535\u6d41\u3002\u4e0b\u6b21\uff0c\u6211\u4eec\u5c06\u4f1a\u6539\u53d8LED\u7684\u4eae\u5ea6\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<\/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\u4e3a\u82f1\u8bd1\u7248\uff0c\u539f\u6587\u53d1\u8868\u4e8edeviceplus.jp\u3002 \u867d\u7136Devices Plus\u5df2\u7ecf\u4ecb\u7ecd\u8fc7Arduino\u7684\u591a\u79cd\u5e94\u7528\u7a0b\u5e8f\u548c\u793a\u4f8b\uff0c\u4f46\u662f\u4e86\u89e3\u76f8\u5173\u57fa\u7840\u77e5\u8bc6\u5bf9\u4e8e\u4efb\u4f55\u9879 [&hellip;]","protected":false},"author":3,"featured_media":16113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1130],"tags":[2425],"class_list":["post-9195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","tag-arduino"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/9195","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=9195"}],"version-history":[{"count":8,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/9195\/revisions"}],"predecessor-version":[{"id":9205,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/9195\/revisions\/9205"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/16113"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=9195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=9195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=9195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}