{"id":744,"date":"2022-12-16T23:08:46","date_gmt":"2022-12-16T15:08:46","guid":{"rendered":"http:\/\/wordpress.loc\/?p=744"},"modified":"2022-12-17T15:29:24","modified_gmt":"2022-12-17T07:29:24","slug":"esp32_ch1-30","status":"publish","type":"post","link":"https:\/\/www.nmking.io\/index.php\/2022\/12\/16\/744\/","title":{"rendered":"ESP32 JTAG\u9664\u932f\u74b0\u5883\u5efa\u7acb\uff1a1.\u958b\u767c\u74b0\u5883\u8a2d\u5b9a\u7bc7"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>\u5c0d\u65bc\u4ee5\u5f80\u6709\u5beb\u904e\u5176\u4ed6\u985e\u578b\u7a0b\u5f0f\u7684\u4eba\u4f86\u8aaa\uff0cArduino IDE\u5176\u5be6\u4e26\u975e\u662f\u5b8c\u6574\u7684\u958b\u767c\u5de5\u5177\uff0c\u5c31\u5148\u4ee5\u7a0b\u5f0f\u57f7\u884c\u904e\u7a0b\u6240\u9700\u7684\u9664\u932f(Debug)\u5de5\u5177\u4f86\u8aaa\u5247\u662f\u5b8c\u5168\u7f3a\u4e4f<\/p><\/blockquote><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-ht-block-toc is-style-rounded htoc htoc--position-wide toc-list-style-plain\" data-htoc-state=\"expanded\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">Table of Contents<\/span><span class=\"htoc__toggle\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\"><g fill=\"#444\"><path d=\"M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><path d=\"M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z\"><\/path><\/g><\/svg><\/span><\/span><div class=\"htoc__itemswrap\"><ul class=\"ht_toc_list\"><li class=\"\"><a href=\"#htoc-\">\u5be6\u505a\u8aaa\u660e<\/a><\/li><li class=\"\"><a href=\"#htoc-vscode\">\u4e00\u3001VSCode\u5b89\u88dd<\/a><\/li><li class=\"\"><a href=\"#htoc-platformio\">\u4e8c\u3001PlatformIO\u5b89\u88dd<\/a><\/li><li class=\"\"><a href=\"#htoc-helloworld\">\u4e09\u3001HelloWorld\u6e2c\u8a66<\/a><\/li><\/ul><\/div><\/div>\n\n\n\n<p>\u6211\u7684ESP32\u5be6\u505a\u66f8\u7c4d\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/10\/esp32_ch1-2\/\" target=\"_blank\">\u6211\u51fa\u66f8\u4e86 ESP32 \u7269\u806f\u7db2\u5c08\u984c<\/a><br>\u535a\u5ba2\u4f86\u7db2\u5740\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/www.books.com.tw\/products\/0010901195\" target=\"_blank\">https:\/\/www.books.com.tw\/products\/0010901195<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-\">\u5be6\u505a\u8aaa\u660e<\/h2>\n\n\n\n<p>\u5c0d\u65bc\u4ee5\u5f80\u6709\u5beb\u904e\u5176\u4ed6\u985e\u578b\u7a0b\u5f0f\u7684\u4eba\u4f86\u8aaa\uff0cArduino IDE\u5176\u5be6\u4e26\u975e\u662f\u5b8c\u6574\u7684\u958b\u767c\u5de5\u5177\uff0c\u4ee5\u7b46\u8005\u5e38\u5728\u4f7f\u7528\u7684\u5fae\u8edf.net\u7cfb\u5217\u958b\u767c\u5de5\u5177\u300cVisual Studio\u300d\u4f86\u8aaa\uff0c\u5148\u4e0d\u8ad6\u5c08\u6848\u7ba1\u7406\u3001\u8cc7\u6e90\u7ba1\u7406\u7b49\u5927\u578b\u5c08\u6848\u9700\u8981\u7528\u5230\u7684\u5de5\u5177\uff0c\u9084\u6709\u8a2d\u8a08\u968e\u6bb5\u9700\u8981\u7528\u5230\u7684\u7a0b\u5f0f\u78bc\u81ea\u52d5\u63d0\u793a\uff08autocompletion\uff09\u4e4b\u5916\uff0c\u5c31\u5148\u4ee5\u7a0b\u5f0f\u57f7\u884c\u904e\u7a0b\u6240\u9700\u7684\u9664\u932f(Debug)\u5de5\u5177\u4f86\u8aaa\u5247\u662f\u5b8c\u5168\u7f3a\u4e4f\u3002<br><br>\u5c0d\u65bc\u7a0b\u5f0f\u8a2d\u8a08\u5e2b\u6700\u9700\u8981\u7528\u5230\u7684\u9664\u932f\u5de5\u5177\u5305\u62ec\u4e2d\u65b7\u9ede\uff08Breakpoint\uff09\u3001\u6b65\u9032\u57f7\u884c\uff08Step Into\uff09\u3001\u8b8a\u6578\u76e3\u770b\uff08Watcher\uff09\u7b49\u4e09\u5927\u5de5\u5177\uff0c\u9019\u4e09\u5927\u5de5\u5177\u53ef\u4ee5\u8b93\u8a2d\u8a08\u5e2b\u5b8c\u5168\u638c\u63e1\u7a0b\u5f0f\u8d70\u5411\uff0c\u300c\u4e2d\u65b7\u9ede\u300d\u53ef\u4ee5\u5728\u91cd\u8981\u7684\u5730\u65b9\u66ab\u505c\uff0c\u7136\u5f8c\u7528\u300c\u6b65\u9032\u57f7\u884c\u300d\u4e00\u6b65\u4e00\u6b65\u67e5\u770b\u7a0b\u5f0f\u7684\u52d5\u614b\uff0c\u6700\u5f8c\u300c\u8b8a\u6578\u76e3\u770b\u300d\u5247\u53ef\u4ee5\u77e5\u9053\u6578\u503c\u76ee\u524d\u72c0\u614b\uff0c\u4e86\u89e3\u8b8a\u6578\u8b8a\u5316\u7684\u904e\u7a0b\uff0c\u56e0\u70ba\u7f3a\u5c11\u9019\u4e9b\u9664\u932f\u5de5\u5177\uff0c\u5c0e\u81f4Arduino\u64b0\u5beb\u5927\u578b\u7a0b\u5f0f\u6642\u975e\u5e38\u8271\u96e3\uff0c\u5927\u90e8\u5206\u90fd\u662f\u900f\u904eSerial\u62cb\u51fa\u8a0a\u606f\u4f86\u67e5\u770b\u7a0b\u5f0f\u57f7\u884c\u72c0\u614b\uff0c\u800c\u7a0b\u5f0f\u4e2d\u904e\u591a\u7684Serial print\u5c0e\u81f4\u7d50\u69cb\u904e\u65bc\u6df7\u4e82\uff0c\u4e5f\u6703\u5f71\u97ff\u7a0b\u5f0f\u57f7\u884c\u6548\u80fd\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799530-1658674471-g.png?resize=840%2C559&#038;ssl=1\" alt=\"\" width=\"840\" height=\"559\"\/><\/figure>\n\n\n\n<p>\u4e0d\u904e\u5176\u5be6\u9019\u662f\u53ef\u4ee5\u89e3\u6c7a\u7684\uff0cArduino\u67b6\u69cb\u4e5f\u662f\u53ef\u4ee5\u50cf\u5176\u4ed6\u958b\u767c\u74b0\u5883\u4e00\u6a23\uff0c\u6709\u7a0b\u5f0f\u78bc\u81ea\u52d5\u63d0\u793a\u3001\u4e2d\u65b7\u9ede\u3001\u6b65\u9032\u57f7\u884c\u3001\u8b8a\u6578\u76e3\u770b\u9019\u4e9b\u5de5\u5177\u7684\uff0c\u53ea\u662f\u9084\u9700\u8981\u5169\u9805\u5de5\u5177\u7684\u652f\u63f4\uff0c\u4e00\u500b\u662f\u6539\u7528\u6709\u652f\u63f4\u9664\u932f\u7684\u958b\u767c\u5de5\u5177VSCode\u53caPlatformIO\uff0c\u53e6\u5916\u5c31\u662f\u9700\u8981\u4e00\u7d44\u80fd\u652f\u63f4JTAG\u9664\u932f\u7684\u5de5\u5177ESP-PROG\u6a21\u7d44\uff0c\u5176\u67b6\u69cb\u5982\u4e0b\u5716\uff0c\u672c\u7ae0\u5c07\u4ecb\u7d39\u5982\u4f55\u5efa\u7acb\u5177\u6709\u9664\u932f\u529f\u80fd\u7684Arduino\u958b\u767c\u74b0\u5883\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799549-3547321813-g_n.png?resize=841%2C283&#038;ssl=1\" alt=\"\" width=\"841\" height=\"283\"\/><\/figure>\n\n\n\n<p>\u5982\u524d\u9762\u6240\u8ff0\uff0cArduino IDE\u7f3a\u5c11\u4e86\u8a31\u591a\u5de5\u5177\uff0c\u56e0\u6b64\u672c\u7bc0\u6211\u5011\u5148\u4ecb\u7d39\u5982\u4f55\u5b89\u88ddVSCode\u53caPlatformIO\u958b\u767c\u5de5\u5177\uff0c\u8b80\u8005\u6703\u89ba\u5f97\u6bd4\u8f03\u5947\u602a\u7684\u662f\uff0c\u7576\u672c\u66f8\u8aaa\u958b\u767c\u5de5\u5177\u662fVSCode\u53caPlatformIO\u6642\uff0c\u90a3\u5230\u5e95\u662f\u6307VSCode\uff1f\u9084\u662f\u7528PlatformIO\u5462\uff1f<\/p>\n\n\n\n<p class=\"quote\">\u61c9\u8a72\u9019\u6a23\u8aaa\u6bd4\u8f03\u7cbe\u78ba\uff1a\u300c\u662f\u7528VSCode\u5e95\u4e0b\u7684\u4e00\u500b\u5ef6\u4f38\u6a21\u7d44\u540d\u7a31\u662fPlatformIO\u4f86\u958b\u767cArduino\u7684\u61c9\u7528\u300d<\/p>\n\n\n\n<p>\u6709\u9ede\u50cf\u662fChrome\u700f\u89bd\u5668\u5e95\u4e0b\u53ef\u4ee5\u5b89\u88dd\u5f88\u591a\u5c0f\u5de5\u5177\uff0c\u800cPlatformIO\u5c31\u662fVSCode\u5e95\u4e0b\u7684\u5de5\u5177\uff0c\u6240\u4ee5\u6211\u5011\u5148\u4f86\u7c21\u4ecbVSCode\u53ca\u4ed6\u7684\u5b89\u88dd\u904e\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-vscode\">\u4e00\u3001VSCode\u5b89\u88dd<\/h2>\n\n\n\n<p>VSCode\u662f\u5fae\u8edf\u63d0\u4f9b\u7684\u958b\u767c\u5de5\u5177\uff0c\u5c6c\u65bc.net\u7cfb\u5217\u958b\u767c\u5de5\u5177Visual Studio .net\uff08\u7c21\u7a31\u70baVS.net\uff09\u7684\u7c21\u6613\u7248\uff0c\u5169\u8005\u6700\u5927\u7684\u5dee\u7570\u5728\u65bcVS.net\u53ea\u652f\u63f4\u5fae\u8edf\u81ea\u5df1\u7684\u958b\u767c\u8a9e\u8a00\u4f8b\u5982C#\u3001VB\u3001ASP\u7b49\uff0c\u800cVSCode\u5247\u53ef\u4ee5\u900f\u904e\u5916\u639b\u6a21\u7d44\u4f86\u7de8\u8f2f\u591a\u7a2e\u7a0b\u5f0f\u8a9e\u8a00\uff0c\u7531\u65bcVSCode\u7684\u7a69\u5b9a\u6027\u53ca\u64f4\u5145\u6027\u53d7\u5230\u975e\u5e38\u591a\u958b\u767c\u8005\u7684\u611b\u7528\uff0c\u672c\u7bc0\u6211\u5011\u6703\u5148\u5b89\u88ddVSCode\u5f8c\uff0c\u518d\u5b89\u88ddPlatformIO\u5ef6\u4f38\u6a21\u7d44\u3002<\/p>\n\n\n\n<p>\u5b89\u88ddVSCode\u975e\u5e38\u7c21\u55ae\uff0c\u5148\u5230\u5fae\u8edf\u7684\u7db2\u7ad9\u76f4\u63a5\u4e0b\u8f09\u5b89\u88dd\u6a94\u3002<\/p>\n\n\n\n<p>VSCode\u4e0b\u8f09\u7db2\u5740\uff1a<a href=\"https:\/\/code.visualstudio.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/code.visualstudio.com\/download<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799560-3390000328-g.png?resize=841%2C442&#038;ssl=1\" alt=\"\" width=\"841\" height=\"442\"\/><figcaption class=\"wp-element-caption\">VSCode\u4e0b\u8f09\u9801\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u7136\u5f8c\u4f9d\u7167\u8b80\u8005\u4f7f\u7528\u7684\u4f5c\u696d\u7cfb\u7d71\u4e0b\u8f09\u7b26\u5408\u7684\u5b89\u88dd\u6a94\uff0c\u5982\u679c\u8b80\u8005\u4e5f\u662fWindows\u7684\u8a71\uff0c\u53ef\u4ee5\u8ddf\u7b46\u8005\u4e00\u6a23\u9ede\u9078\u4e0a\u5716\u7d05\u5708\u90e8\u4efd\uff1aSystem Installer 64 bit\u3002\u4e0b\u8f09\u5f8c\uff0c\u4f9d\u7167\u4e0b\u9762\u7684\u6b65\u9a5f\u5b8c\u6210\u5b89\u88dd\u3002<\/p>\n\n\n\n<p>1.\u78ba\u8a8d\u540c\u610f\u6388\u6b0a\u689d\u6b3e<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799591-1661784652-g.png?resize=839%2C602&#038;ssl=1\" alt=\"\" width=\"839\" height=\"602\"\/><\/figure>\n\n\n\n<p>2.\u5b89\u88dd\u9078\u9805\uff0c\u52fe\u9078\u300c\u5efa\u7acb\u684c\u9762\u5716\u793a\u300d\u53ca\u300c\u52a0\u5165PATH\u4e2d\u300d\u5169\u500b\u9078\u9805\u5373\u53ef<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799599-439279096-g.png?resize=840%2C600&#038;ssl=1\" alt=\"\" width=\"840\" height=\"600\"\/><\/figure>\n\n\n\n<p>3.\u9ede\u9078\u5b89\u88dd\u6309\u9215\uff0c\u9032\u5165\u7a0b\u5f0f\u5b89\u88dd\u904e\u7a0b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799606-96776006-g.png?resize=840%2C605&#038;ssl=1\" alt=\"\" width=\"840\" height=\"605\"\/><\/figure>\n\n\n\n<p>4.\u7b49\u5019\u5b89\u88dd\u904e\u7a0b\u5b8c\u7562<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799624-2623390758-g.png?resize=841%2C600&#038;ssl=1\" alt=\"\" width=\"841\" height=\"600\"\/><\/figure>\n\n\n\n<p>5.\u5b89\u88dd\u5b8c\u7562\u4e86\uff0c\u6309\u5b8c\u6210\uff0c\u555f\u52d5VSCode<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799631-9855660-g.png?resize=839%2C600&#038;ssl=1\" alt=\"\" width=\"839\" height=\"600\"\/><\/figure>\n\n\n\n<p>6.VSCode\u958b\u555f\u5f8c\u7684\u756b\u9762<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799638-3894961226-g.png?resize=840%2C628&#038;ssl=1\" alt=\"\" width=\"840\" height=\"628\"\/><\/figure>\n\n\n\n<p>7.\u7531\u65bcVSCode\u9810\u8a2d\u70ba\u82f1\u6587\u754c\u9762\uff0c\u6211\u5011\u53ef\u4ee5\u5b89\u88dd\u4e2d\u6587\u5ef6\u4f38\u6a21\u7d44\u4f86\u6539\u6210\u4e2d\u6587\u754c\u9762<\/p>\n\n\n\n<p>(1)\u8acb\u9ede\u9078\u5de6\u5074\u5ef6\u4f38\u6a21\u7d44\u5716\u793a<br>(2)\u5728\u95dc\u9375\u5b57\u8f38\u5165\u300cchinese\u300d<br>(3)\u627e\u5230\u4e2d\u6587(\u7e41\u9ad4)\u7684\u5ef6\u4f38\u6a21\u7d44\u540d\u7a31<br>(4)\u9ede\u53f3\u908a\u7684install\u5b89\u88dd\u6309\u9215<br>(5) \u5b8c\u6210\u5b89\u88dd\u5f8c\uff0c\u53f3\u4e0b\u89d2\u6703\u51fa\u73fe\u4e00\u500b\u6d6e\u52d5\u8996\u7a97\uff0c\u5167\u5bb9\u662f\u300c\u8acb\u91cd\u958b\u555f\u52d5\u4ee5\u5207\u63db\u6210\u4e2d\u6587\u300d\uff0c\u9ede\u9078Restart\u6309\u9215\u5373\u53ef\u5207\u63db\u4e2d\u6587<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799667-2413485174-g.png?resize=839%2C625&#038;ssl=1\" alt=\"\" width=\"839\" height=\"625\"\/><\/figure>\n\n\n\n<p>\u5b8c\u6210\u4e2d\u6587\u756b\u9762\u5207\u63db<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799693-4032237281-g.png?resize=842%2C629&#038;ssl=1\" alt=\"\" width=\"842\" height=\"629\"\/><\/figure>\n\n\n\n<p>\u5230\u9019\u88e1\u70ba\u6b62\uff0c\u6211\u5011\u5df2\u7d93\u5b8c\u6210VSCode\u7684\u5b89\u88dd\u8207\u8a2d\u5b9a\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u5b89\u88ddPlatformIO\u7684\u5ef6\u4f38\u6a21\u7d44\u4f86\u652f\u63f4Arduino\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-platformio\">\u4e8c\u3001PlatformIO\u5b89\u88dd<\/h2>\n\n\n\n<p>PlatformIO\u662f\u4e00\u500b\u5d4c\u5165\u5f0f\u8a2d\u5099\u7684\u5ef6\u4f38\u958b\u767c\u5de5\u5177\uff0c\u95dc\u65bcPlatformIO\u7684\u76f8\u95dc\u6b77\u53f2\uff0c\u53ef\u4ee5\u53c3\u95b1\u5b98\u65b9\u7db2\u7ad9 \uff0c\u800c\u5b89\u88ddPlatformIO\u6211\u5011\u53ea\u9808\u5f9eVSCode\u7684\u5ef6\u4f38\u6a21\u7d44\u4e2d\u4e0b\u8f09\u5373\u53ef<\/p>\n\n\n\n<p>1.\u5b89\u88ddPlatformIO\u5ef6\u4f38\u6a21\u7d44<\/p>\n\n\n\n<p>(1)\u9ede\u9078\u5de6\u5074\u5ef6\u4f38\u6a21\u7d44<br>(2)\u65bc\u4e0a\u65b9\u95dc\u9375\u5b57\u8655\u8f38\u5165\u300cPlatformIO\u300d<br>(3)\u627e\u5230PlatformIO<br>(4)\u9ede\u9078\u53f3\u5074\u7684\u5b89\u88dd\u6309\u9215\uff0c\u5373\u53ef\u958b\u59cb\u5b89\u88dd\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799877-4146350697-g.png?resize=841%2C594&#038;ssl=1\" alt=\"\" width=\"841\" height=\"594\"\/><\/figure>\n\n\n\n<p>(5)\u5b89\u88dd\u904e\u7a0b\u9700\u8981\u5f9e\u7db2\u8def\u4e0b\u8f09\u8a31\u591a\u5176\u4ed6\u6a21\u7d44\uff0c\u56e0\u6b64\u6703\u4f54\u7528\u8f03\u591a\u6642\u9593<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799903-2512337947-g.png?resize=839%2C583&#038;ssl=1\" alt=\"\" width=\"839\" height=\"583\"\/><\/figure>\n\n\n\n<p>(6)\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u6703\u8df3\u51fa\u6d6e\u52d5\u8996\u7a97\uff0c\u8acb\u60a8\u91cd\u958bVSCode<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799909-1704165083-g.png?resize=841%2C584&#038;ssl=1\" alt=\"\" width=\"841\" height=\"584\"\/><\/figure>\n\n\n\n<p>(7)\u91cd\u958bVSCode\u4e4b\u5f8c\uff0c\u518d\u7a0d\u5f8c\u4e00\u6703\u5c31\u53ef\u4ee5\u770b\u5230PlatformIO\u7684\u5716\u793a\u51fa\u73fe\u5728\u5de6\u5074\u7684\u5de5\u5177\u6b04\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799916-4210491352-g.png?resize=840%2C588&#038;ssl=1\" alt=\"\" width=\"840\" height=\"588\"\/><\/figure>\n\n\n\n<p>2.\u5728PlatformIO\u57f7\u884cHelloWorld<\/p>\n\n\n\n<p>(1)\u9ede\u9078\u5de6\u4e0b\u89d2\u7684PlatformIO Home\u623f\u5b50\u5716\u793a\uff0c\u5373\u53ef\u9032\u5165\u8d77\u59cb\u756b\u9762<br>(2)\u9ede\u9078+New Project\uff0c\u5efa\u7acb\u7b2c\u4e00\u500b\u7a0b\u5f0f<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799946-3456760168-g.png?resize=839%2C588&#038;ssl=1\" alt=\"\" width=\"839\" height=\"588\"\/><\/figure>\n\n\n\n<p>(3)\u5728Name\u5730\u65b9\u8f38\u5165\u8a08\u756b\u540d\u7a31\u70baHelloWorld\uff08\u8b80\u8005\u53ef\u4ee5\u81ea\u5df1\u53d6\u540d\uff09<br>(4)\u5728Board\u7684\u5730\u65b9\uff0c\u9078\u64c7\u958b\u767c\u677f\u70baEspressif ESP-WROVER-KIT\uff0c\u7531\u65bc\u652f\u63f4\u677f\u5b50\u773e\u591a\uff0c\u53ef\u4ee5\u5148\u8f38\u5165ESP32\u4f86\u9810\u5148\u7be9\u9078<br>(5)Framework\u9078\u64c7Arduino\uff0cESP32\u958b\u767c\u53ef\u4ee5\u9078\u64c7Arduino\u6216Espressif IoT Development Framework\u5169\u7a2e\u67b6\u69cb\uff0c\u672c\u4f8b\u5247\u9078\u64c7\u4f7f\u7528Arduino\u3002<br>(6)Location\u5247\u662f\u9078\u64c7\u5b58\u6a94\u7684\u4f4d\u7f6e\uff0c\u9810\u8a2d\u5728My documents\u5167\uff0c\u8b80\u8005\u53ef\u4ee5\u81ea\u884c\u9078\u64c7\u5176\u4ed6\u4f4d\u7f6e\u5b58\u6a94\uff0c\u9019\u88e1\u66ab\u6642\u7528\u9810\u8a2d\u4f4d\u7f6e\uff0c\u4fdd\u7559\u52fe\u9078\u3002<br>(7)\u5b8c\u6210\u5f8c\uff0c\u9ede\u9078Finish\u5373\u53ef<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799981-3446565131-g.png?resize=839%2C586&#038;ssl=1\" alt=\"\" width=\"839\" height=\"586\"\/><\/figure>\n\n\n\n<p>(8)\u7b2c\u4e00\u6b21\u7684\u7a0b\u5f0f\u958b\u555f\u6703\u9700\u8981\u4e0b\u8f09ESP32\u76f8\u5bb9\u5143\u4ef6\uff0c\u53c8\u6703\u82b1\u8a31\u4e0a\u7d045-20\u5206\u9418\u6642\u9593\uff08\u8996\u7db2\u8def\u4e0b\u8f09\u901f\u5ea6\u800c\u5b9a\uff09\uff0c\u4f46\u5f80\u5f8c\u5c31\u53ef\u4ee5\u5feb\u901f\u958b\u555f\u65b0\u8a08\u756b\uff0c\u8acb\u8010\u5fc3\u7b49\u5019\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614799987-2256710196-g.png?resize=840%2C585&#038;ssl=1\" alt=\"\" width=\"840\" height=\"585\"\/><\/figure>\n\n\n\n<p>(9)\u5b8c\u6210\u958b\u555f\u5f8c\uff0c\u5de6\u5074\u6703\u51fa\u73fe\u6a94\u6848\u7e3d\u7ba1\uff0c\u8cc7\u6599\u593e\u5e95\u4e0b\u70ba\u672c\u7a0b\u5f0f\u7684\u6240\u6709\u76f8\u95dc\u8cc7\u6e90\uff0c\u6211\u5011\u8981\u64b0\u5beb\u7684\u7a0b\u5f0f\u78bc\u5728src\/main.cpp\uff0c\u6211\u5011\u5c0dmain.cpp\u5feb\u901f\u9ede\u5169\u4e0b\uff0c\u5c31\u53ef\u4ee5\u958b\u555f\u7a0b\u5f0f\u78bc\uff0c\u9019\u88e1\u53ef\u4ee5\u767c\u73fePlatformIO\u7684\u9644\u6a94\u540d\u70ba.cpp\u8207Arduino\u7684.ino\u96d6\u7136\u4e0d\u540c\uff0c\u4f46\u8a9e\u6cd5\u662f\u5b8c\u5168\u76f8\u540c\u7684\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614800006-911155826-g.png?resize=840%2C584&#038;ssl=1\" alt=\"\" width=\"840\" height=\"584\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-helloworld\">\u4e09\u3001HelloWorld\u6e2c\u8a66<\/h2>\n\n\n\n<p>\u5728\u7a0b\u5f0f\u78bc\u8996\u7a97\u5167\u8f38\u5165HelloWorld\u7a0b\u5f0f\u78bc<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include  &lt;Arduino.h>\n  void setup() {\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  Serial.println(\"Hello world!\");\n  delay(1000);\n}<\/code><\/pre>\n\n\n\n<p>\u7a0b\u5f0f\u78bc\u7d50\u69cb\u8207Arduino IDE\u7684\u5beb\u6cd5\u662f\u5b8c\u5168\u76f8\u540c\u7684\uff0c\u4e0d\u904e\u6700\u4e0a\u65b9\u7684#include \u9019\u500b\u51fd\u5f0f\u5eab\u662f\u6bcf\u4e00\u500b\u7a0b\u5f0f\u90fd\u4e00\u5b9a\u8981\u52a0\u7684\uff0c\u53e6\u5916\u5c31\u662fSerial\u7684\u901f\u7387\u6211\u5011\u9078\u64c79600\uff0c\u56e0\u70ba\u9019\u662f\u9810\u8a2d\u503c\uff0c\u8981\u4fee\u6539\u7684\u8a71\u8981\u9032\u5165platformio.ini\u521d\u59cb\u5316\u8a2d\u5b9a\u6a94\u4e2d\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u4f86\u6211\u5011\u61c9\u8a72\u8981\u4f86\u4e0a\u50b3\uff0c\u4ee5\u5f80\u5728Arduino IDE\u6703\u6709\u4e00\u500bPort\u865f\u8981\u5148\u9078\u64c7\uff0c\u5728PlatformIO\u5247\u4e0d\u9700\u8981\uff0cPlatformIO\u6703\u5f88\u81ea\u52d5\u7684\u5e6b\u6211\u5011\u627e\u5230\u88dd\u7f6e\u7684Port\u865f\u5f8c\u76f4\u63a5\u4e0a\u50b3\u3002\u4e0d\u904e\u82e5\u60a8\u9700\u8981\u6307\u5b9aPort\u865f\u7684\u8a71\uff0c\u5247\u4e00\u6a23\u8981\u7528platformio.ini\u521d\u59cb\u5316\u8a2d\u5b9a\u6a94\u4f86\u8a2d\u5b9a\uff0c\u9019\u90e8\u4efd\u6211\u5011\u7a0d\u5f8c\u6703\u8aaa\u660e\u3002<\/p>\n\n\n\n<p>\u7de8\u8b6f\u53ca\u4e0a\u50b3\u7a0b\u5f0f\u7684\u6309\u9215\u5728PlatformIO\u5247\u6539\u5728\u6700\u4e0b\u65b9\uff0c\u5176\u5716\u793a\u8207Arduino\u4e00\u81f4\uff0c\u90fd\u662f\u300c\u7de8\u8b6f\u300d\u70ba\u6253\u52fe \u3001\u300c\u4e0a\u50b3\u7a0b\u5f0f\u78bc\u300d\u70ba\u5411\u53f3\u7bad\u982d \uff0c\u6211\u5011\u5229\u7528 \u5c07\u7a0b\u5f0f\u71d2\u9304\u5230ESP32\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614800195-3795418685-g.png?resize=841%2C586&#038;ssl=1\" alt=\"\" width=\"841\" height=\"586\"\/><\/figure>\n\n\n\n<p>\u71d2\u9304\u5b8c\u6210\u5f8c\uff0c\u5247\u8981\u7528\u63d2\u982d \u5716\u793a\u4f86\u958b\u555f\u300c\u5e8f\u5217\u76e3\u63a7\u8996\u7a97\u300d\uff0c\u9019\u6a23\u5c31\u53ef\u4ee5\u770b\u5230HelloWorld\u4e86\uff0c\u5230\u9019\u88e1\u5c31\u53ef\u4ee5\u78ba\u5b9a\u6211\u5011\u5b89\u88dd\u7684VSCode\u53caPlatformIO\u74b0\u5883\u90fd\u662f\u6b63\u78ba\u7684\u6c92\u554f\u984c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614800212-1738656154-g.png?resize=841%2C584&#038;ssl=1\" alt=\"\" width=\"841\" height=\"584\"\/><\/figure>\n\n\n\n<p>\u82e5\u8b80\u8005\u9700\u8981\u4fee\u6539Port\u865f\uff0c\u6216\u8005\u5e8f\u5217\u57e0\u7684\u9b91\u7387\u7b49\u8a2d\u5b9a\uff0c\u5247\u53ef\u4ee5\u958b\u555fplatformio.ini\u6a94\u6848\uff0c\u4e26\u5728\u6700\u4e0b\u65b9\u52a0\u5165\u8a2d\u5b9a\uff0c\u5176\u4e2dCOM3\u70ba\u7b46\u8005\u96fb\u8166\u7684\u5e8f\u5217Port\u865f\uff0c\u8acb\u8b80\u8005\u4f9d\u7167\u81ea\u5df1\u7684\u96fb\u8166\u74b0\u5883\u4fee\u6539\u6b63\u78ba\u7684COM\u7de8\u865f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1614800229-985366635-g.png?resize=839%2C522&#038;ssl=1\" alt=\"\" width=\"839\" height=\"522\"\/><\/figure>\n\n\n\n<p>\u95dc\u65bcplatformio.ini\u80fd\u8a2d\u5b9a\u7684\u90e8\u4efd\u76f8\u7576\u591a\uff0c\u8acb\u81ea\u884c\u53c3\u8003\u5b98\u65b9\u8aaa\u660e \uff0c\u672c\u66f8\u50c5\u91dd\u5c0d\u76f8\u95dc\u90e8\u4efd\u505a\u8aaa\u660e\uff0c\u7121\u6cd5\u4e00\u4e00\u5217\u8209\u3002<\/p>\n\n\n\n<p>\u81f3\u6b64\uff0c\u6211\u5011\u5df2\u7d93\u5b8c\u6210Arduino\u9664\u932f\u74b0\u5883\u5efa\u7acb\u7684\u7b2c\u4e00\u968e\u6bb5 \u958b\u767c\u74b0\u5883\u8a2d\u5b9a\uff0c\u4e0b\u4e00\u7bc7\u6211\u5011\u5c07\u6703\u4ecb\u7d39\u5982\u4f55\u63a5\u4e0aESP-PROG\u88dd\u7f6e\uff0c\u4e26\u7528JTAG\u9032\u884c\u9664\u932f\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u7bc7 ESP-PROG\u5b89\u88dd\u8207\u8a2d\u5b9a\uff1a<a href=\"https:\/\/www.nmking.io\/index.php\/2022\/12\/17\/esp32_ch1-31\/\">ESP32 JTAG\u9664<\/a><a href=\"https:\/\/www.nmking.io\/index.php\/2022\/12\/17\/esp32_ch1-31\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u932f\u74b0<\/a><a href=\"https:\/\/www.nmking.io\/index.php\/2022\/12\/17\/esp32_ch1-31\/\">\u5883\u5efa\u7acb\uff1a2.ESP-PROG\u5b89\u88dd\u8207\u8a2d\u5b9a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c0d\u65bc\u4ee5\u5f80\u6709\u5beb\u904e\u5176\u4ed6\u985e\u578b\u7a0b\u5f0f\u7684\u4eba\u4f86\u8aaa\uff0cArduino IDE\u5176\u5be6\u4e26\u975e\u662f\u5b8c\u6574\u7684\u958b\u767c\u5de5\u5177\uff0c\u5c31\u5148\u4ee5\u7a0b\u5f0f\u57f7\u884c\u904e\u7a0b\u6240\u9700\u7684\u9664 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-744","post","type-post","status-publish","format-standard","hentry","category-esp32"],"blocksy_meta":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/comments?post=744"}],"version-history":[{"count":2,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/744\/revisions"}],"predecessor-version":[{"id":754,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/744\/revisions\/754"}],"wp:attachment":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/media?parent=744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/categories?post=744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/tags?post=744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}