{"id":596,"date":"2025-12-02T01:50:22","date_gmt":"2025-12-01T17:50:22","guid":{"rendered":"http:\/\/175.178.117.18\/?p=596"},"modified":"2025-12-02T01:52:29","modified_gmt":"2025-12-01T17:52:29","slug":"596","status":"publish","type":"post","link":"https:\/\/starhill.online\/index.php\/2025\/12\/02\/596\/","title":{"rendered":"\u5728 ESP-IDF \u4e2d\u4f7f\u7528 Arduino \u7684\u7b2c\u4e09\u65b9\u5e93"},"content":{"rendered":"<p>\u9996\u5148\u9700\u8981\u53bb\u627e\u5230\u5bf9\u5e94IDF\u7248\u672c\u7684Arduino\u7248\u672c\uff0c\u6211\u81ea\u5df1\u662fIDF5.5.1\uff0c\u8fd9\u91cc\u4e0b\u8f7d\u7684\u662f<\/p>\n<p><a href=\"https:\/\/github.com\/espressif\/arduino-esp32\">espressif\/arduino-esp32: Arduino core for the ESP32<\/a><\/p>\n<figure id=\"attachment_mmd_590\" class=\"wp-block-image alignnone\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/0.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" width=\"1344\" height=\"729\" data-original=\"https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/0.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-full size-full\" alt=\"0\" loading=\"lazy\" align=\"none\" \/><\/div><\/figure>\n<h2>\u5c06 arduino-esp32 \u5e93\u4f5c\u4e3a\u5de5\u7a0b\u7684\u7ec4\u4ef6\u6765\u4f7f\u7528<\/h2>\n<p>1.\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5de5\u7a0b,\u8fd9\u91cc\u4f7f\u7528IDF\u4e2d\u7684hello_world\u7684\u793a\u4f8b<\/p>\n<figure id=\"attachment_mmd_591\" class=\"wp-block-image alignnone\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" width=\"1196\" height=\"473\" data-original=\"https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-full size-full\" alt=\"1\" loading=\"lazy\" align=\"none\" \/><\/div><\/figure>\n<p>2.\u5c06main\u6587\u4ef6\u5939\u4e0b\u7684 <code>hello_world_main.c<\/code> \u91cd\u547d\u540d\u4e3ac++\u6587\u4ef6\uff0c <code>hello_world_main.cc<\/code> ,\u5e76\u5c06mian\u6587\u4ef6\u4e0b\u7684cmakelists.txt\u4e2d\u7684\u5185\u5bb9\u4fee\u6539\u5982\u4e0b\n<figure id=\"attachment_mmd_592\" class=\"wp-block-image alignnone\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/2.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" width=\"1083\" height=\"574\" data-original=\"https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/2.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-full size-full\" alt=\"2\" loading=\"lazy\" align=\"none\" \/><\/div><\/figure>\n<p>3.\u5c06hello_world_main.cc\u4ee3\u7801\u4fee\u6539\u5982\u4e0b<\/p>\n<pre><code class=\"lang-c language-c c\">#include &quot;Arduino.h&quot;\n\nextern &quot;C&quot; void app_main()\n{\n  initArduino();\n\n  \/\/ Arduino-like setup()\n  Serial.begin(115200);\n  while(!Serial){\n    ; \/\/ wait for serial port to connect\n  }\n\n  \/\/ Arduino-like loop()\n  while(true){\n    Serial.println(&quot;loop&quot;);\n    delay(1000);\n  }<\/code><\/pre>\n<p>4.CONFIG_FREERTOS_HZ=100\u4fee\u6539\u4e3a1000<\/p>\n<figure id=\"attachment_mmd_594\" class=\"wp-block-image alignnone\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/4.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" width=\"949\" height=\"507\" data-original=\"https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/4.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-full size-full\" alt=\"4\" loading=\"lazy\" align=\"none\" \/><\/div><\/figure>\n<p>5.\u7f16\u8bd1\u70e7\u5f55\u5373\u53ef<\/p>\n<figure id=\"attachment_mmd_595\" class=\"wp-block-image alignnone\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/5.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" width=\"813\" height=\"591\" data-original=\"https:\/\/starhill.online\/wp-content\/uploads\/2025\/12\/5.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" class=\"attachment-full size-full\" alt=\"5\" loading=\"lazy\" align=\"none\" \/><\/div><\/figure>\n<p>\u5b8c\u6574\u9879\u76ee\u94fe\u63a5<\/p>\n<p>\u901a\u8fc7\u7f51\u76d8\u5206\u4eab\u7684\u6587\u4ef6\uff1aIDF_Use_Arduino_Library.zip\n\u94fe\u63a5: <a href=\"https:\/\/pan.baidu.com\/s\/19S8f-10_Vqg24cYb1L_bPw?pwd=j2wt\">https:\/\/pan.baidu.com\/s\/19S8f-10_Vqg24cYb1L_bPw?pwd=j2wt<\/a> \u63d0\u53d6\u7801: j2wt\n&#8211;\u6765\u81ea\u767e\u5ea6\u7f51\u76d8\u8d85\u7ea7\u4f1a\u5458v4\u7684\u5206\u4eab<\/p>","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u9700\u8981\u53bb\u627e\u5230\u5bf9\u5e94IDF\u7248\u672c\u7684Arduino\u7248\u672c\uff0c\u6211\u81ea\u5df1\u662fIDF5.5.1\uff0c\u8fd9\u91cc\u4e0b\u8f7d\u7684\u662f espressif\/ [&hellip;]<\/p>","protected":false},"author":1,"featured_media":589,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[5],"class_list":["post-596","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32","tag-esp32"],"_links":{"self":[{"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/posts\/596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/comments?post=596"}],"version-history":[{"count":4,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/posts\/596\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/posts\/596\/revisions\/600"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/media\/589"}],"wp:attachment":[{"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/media?parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/categories?post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/starhill.online\/index.php\/wp-json\/wp\/v2\/tags?post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}