{"id":11954,"date":"2023-11-15T22:34:09","date_gmt":"2023-11-15T14:34:09","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=11954"},"modified":"2024-05-05T12:31:31","modified_gmt":"2024-05-05T04:31:31","slug":"arduino-ide-%e5%88%86%e6%96%87%e4%bb%b6%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=11954","title":{"rendered":"Arduino IDE \u591a\u6587\u4ef6\u5f00\u53d1"},"content":{"rendered":"<p>\u5982\u679c\u5199\u7684\u4e1c\u897f\u5f88\u5c0f\u53ef\u80fd\u4e00\u4e2a\u6587\u4ef6\u4e5f\u6e05\u6670\u660e\u4e86\uff0c\u4f46\u662f\u5982\u679c\u9879\u76ee\u6bd4\u8f83\u5927\uff0c\u5168\u90e8\u90fd\u5199\u5728\u4e00\u4e2a\u6587\u4ef6\u91cc\u5c31\u663e\u5f97\u5f88\u6df7\u4e71\uff0c\u5199\u5230\u540e\u9762\u8c03\u8bd5\u56f0\u96be\uff0c\u540e\u671f\u7ef4\u62a4\u4e5f\u96be\uff0c\u6240\u4ee5\u53ef\u4ee5\u5206\u6587\u4ef6\u5f00\u53d1\u3002<\/p>\n<p>1.\u6d4b\u8bd5\u73af\u5883<\/p>\n<p>Arduino IDE 2.2.1<\/p>\n<p>2.\u6587\u4ef6\u7ed3\u6784<\/p>\n<p>Arduino IDE \u9879\u76ee\u5fc5\u987b\u6709\u4e00\u4e2a .ino \u6587\u4ef6\uff0c\u4e14\u201c\u5165\u53e3\u51fd\u6570\u201d\uff08\u5982\u4e0b\uff09\u5fc5\u987b\u5728\u8fd9\u4e2a\u6587\u4ef6\uff0c\u53e6\u5916 Arduino IDE \u8981\u6c42 .ino \u6587\u4ef6\u7684\u540d\u5b57\u548c\u6240\u5728\u7684\u9879\u76ee\u6587\u4ef6\u5939\u540d\u5b57\u4e00\u6837<\/p>\n<pre><code class=\"language-cpp\">void setup()\n{\n\n}\n\nvoid loop()\n{\n\n}<\/code><\/pre>\n<p>\u7136\u540e\u9879\u76ee\u7684\u5176\u5b83\u7ec4\u6210\u6587\u4ef6\u548c\u4e00\u822c C++ \u5f00\u53d1\u4e00\u6837\uff0c\u6e90\u6587\u4ef6\u4e3a .cpp\uff0c\u5934\u6587\u4ef6\u4e3a .h \u6216 .hpp\uff0c\u6211\u770b\u5f88\u591a Arduino \u5f00\u6e90\u5e93\u7684\u5934\u6587\u4ef6\u662f\u7528\u7684 .h\uff0c\u4f46\u662f\u6211\u8fd8\u662f\u559c\u6b22\u6309\u7167 C++ \u7684\u4e60\u60ef\u7528 .hpp\uff0c\u4ee5\u548c C \u8bed\u8a00\u7684 .h \u76f8\u533a\u5206\u3002<br \/>\n\u53e6\u5916\uff0c\u5982\u679c\u6e90\u6587\u4ef6\u6216\u8005\u5934\u6587\u4ef6\u7528\u5230\u4e86\u5e93\u51fd\u6570\u6216\u8005\u5e93\u4e2d\u5b9a\u4e49\u7684\u7c7b\u578b\uff0c\u9700\u8981\u5305\u542b Arduino.h \u6587\u4ef6\uff0c\u8fd9\u4e2a\u5728 .ino \u6587\u4ef6\u4e2d\u4f1a\u81ea\u52a8\u6dfb\u52a0\uff0c\u4f46\u662f\u5916\u90e8\u4f7f\u7528\u5c31\u5f97\u81ea\u5df1\u5305\u542b\u4e86\u3002<\/p>\n<p>3.\u793a\u4f8b<\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/11\/image-1700058248459.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 650px; --smush-placeholder-aspect-ratio: 650\/266;\" \/><br \/>\n\u7528 Arduino IDE \u6253\u5f00 .ino \u6587\u4ef6\uff0c\u4f1a\u81ea\u52a8\u6253\u5f00\u9879\u76ee\u4e2d\u7684\u5176\u5b83\u6587\u4ef6<\/p>\n<p>\u8fd9\u91cc\u5199\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5728 module \u4e2d\u5b9e\u73b0\u4e86\u4e24\u4e2a\u51fd\u6570\u3002<br \/>\n\u5934\u6587\u4ef6\u4e2d\u58f0\u660e\u51fd\u6570\u539f\u578b\uff0c\u7136\u540e\u52a0\u4e0a\u5b8f\u5b9a\u4e49\u9632\u6b62\u91cd\u590d\u5305\u542b\uff0c\u8fd9\u4e2a\u548c C\/C++ \u5f00\u53d1\u4e00\u6837\uff0c\u7136\u540e\u8fd9\u91cc\u7528\u5230\u4e86 C++ \u4e2d\u7684\u5b57\u7b26\u4e32\u6570\u636e\u7c7b\u578b String\uff0c\u6240\u4ee5\u9700\u8981\u5305\u542b Arduino.h \u6587\u4ef6\u3002<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/11\/image-1700058279303.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 336px; --smush-placeholder-aspect-ratio: 336\/223;\" \/><\/p>\n<p>\u7136\u540e\u6e90\u6587\u4ef6\u5199\u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5305\u542b\u4e0a\u58f0\u660e\u51fd\u6570\u539f\u578b\u7684\u5934\u6587\u4ef6<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/11\/image-1700058700952.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 328px; --smush-placeholder-aspect-ratio: 328\/303;\" \/><\/p>\n<p>.ino \u6587\u4ef6\u5c31\u6b63\u5e38\u5199\uff0c\u56e0\u4e3a\u7528\u5230\u4e86\u5916\u90e8\u6e90\u7801\uff0c\u9700\u8981\u5305\u542b\u81ea\u5df1\u5199\u7684\u5934\u6587\u4ef6<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/11\/image-1700058760179.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 342px; --smush-placeholder-aspect-ratio: 342\/309;\" \/><\/p>\n<p>\u7f16\u8bd1\u4e0a\u4f20<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2023\/11\/image-1700058850370.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 664px; --smush-placeholder-aspect-ratio: 664\/721;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u5199\u7684\u4e1c\u897f\u5f88\u5c0f\u53ef\u80fd\u4e00\u4e2a\u6587\u4ef6\u4e5f\u6e05\u6670\u660e\u4e86\uff0c\u4f46\u662f\u5982\u679c\u9879\u76ee\u6bd4\u8f83\u5927\uff0c\u5168\u90e8\u90fd\u5199\u5728\u4e00\u4e2a\u6587\u4ef6\u91cc\u5c31\u663e\u5f97\u5f88\u6df7\u4e71\uff0c\u5199\u5230\u540e\u9762\u8c03\u8bd5\u56f0\u96be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[1,603],"tags":[],"class_list":["post-11954","post","type-post","status-publish","format-standard","hentry","category-all","category-arduino"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/11954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11954"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/11954\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}