{"id":112,"date":"2022-09-13T18:06:52","date_gmt":"2022-09-13T10:06:52","guid":{"rendered":"http:\/\/wordpress.loc\/?p=112"},"modified":"2026-01-17T14:41:40","modified_gmt":"2026-01-17T06:41:40","slug":"esp32_ch1","status":"publish","type":"post","link":"https:\/\/www.nmking.io\/index.php\/2022\/09\/13\/112\/","title":{"rendered":"\u7b2c01\u7bc7 ESP32 Arduino\u958b\u767c\u74b0\u5883\u67b6\u8a2d"},"content":{"rendered":"\n<figure class=\"wp-block-pullquote\"><blockquote><p>ESP32 \u5167\u5efa\u85cd\u7259\u53caWiFi \u5177\u96d9\u6838\u5fc3\u3001\u6df1\u5ea6\u7761\u7720\u3001\u9060\u7aef\u66f4\u65b0OTA \u7b49\u529f\u80fd<br>\u53ef\u4ee5\u88dc\u8db3\u50b3\u7d71 Arduino \u7f3a\u4e4f\u7684\u7db2\u8def\u4e32\u9023\u670d\u52d9<\/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-bulleted\" data-htoc-state=\"expanded\" data-htoc-scrollspy=\"false\" data-htoc-auto-collapse=\"true\" data-htoc-mapping-headers=\"[false,true,true,false,false,false]\"><span class=\"htoc__title\"><span class=\"ht_toc_title\">ESP32 Arduino\u958b\u767c\u74b0\u5883\u67b6\u8a2d\u65b9\u6cd5<\/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-esp32\">ESP32\u4ecb\u7d39<\/a><\/li><li class=\"\"><a href=\"#htoc-arduino-ide\">Arduino IDE \u7de8\u8f2f\u5de5\u5177\u5b89\u88dd<\/a><\/li><li class=\"\"><a href=\"#htoc-esp321\">\u5b89\u88ddESP32\u6838\u5fc3\u7a0b\u5f0f<\/a><\/li><li class=\"\"><a href=\"#htoc-esp3211\">\u5b89\u88ddESP32\u9a45\u52d5\u7a0b\u5f0f<\/a><\/li><li class=\"\"><a href=\"#htoc-hello-world\">\u7a0b\u5f0f\u4e0a\u50b3\u6e2c\u8a66 Hello World !<\/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><br><br>\u958b\u767c\u74b0\u5883\u64cd\u4f5c\u4e5f\u53ef\u4ee5\u53c3\u8003\u672c\u4eba\u7684ESP32 Youtube\u6559\u5b78\u983b\u9053<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"\u300cIoT\u7269\u806f\u7db2\u61c9\u7528 \u4f7f\u7528ESP32\u958b\u767c\u7248\u8207Arduino C\u8a9e\u8a00\u300dCH2 ESP32\u958b\u767c\u74b0\u5883\u67b6\u8a2d\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/3mE7-ioo8zM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\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-esp32\">ESP32\u4ecb\u7d39<\/h2>\n\n\n\n<p>ESP32\u8173\u4f4d\uff1a\u8173\u4f4d36\u6839\uff0c\u6263\u9664\u7cfb\u7d71\u4f7f\u7528\u7d0410\u6839\uff0c\u9084\u6709\u7d0426\u6839\u53ef\u7528\uff0c\u8173\u4f4d\u8aaa\u660e\u5982\u4e0b\u5716<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584374673-2956395738.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:421px\"\/><\/figure>\n\n\n\n<p>\u9019\u88e1\u7279\u5225\u8aaa\u660e\uff0c\u5982\u679c\u4f60\u7528\u904eESP8266\u7cfb\u5217\u7522\u54c1\uff0c\u4f60\u6703\u767c\u73fe8266\u6700\u5927\u7684\u554f\u984c\u662f\u4ed6\u7684\u985e\u6bd4\u53ea\u67091\u500b\uff0c\u800cESP32\u5247\u670918\u500bADC\uff0c\u4e5f\u5c31\u662f\u8aaa\u670918\u500b\u8173\u4f4d\u662f\u4e0d\u5206\u6578\u4f4d\u985e\u6bd4\uff0c\u76f4\u63a5\u4f7f\u7528analogRead\u6216digitalRead\u5c31\u53ef\u4ee5\u5206\u5225\u505a\u985e\u5225\u6216\u6578\u4f4d\u8b80\u53d6\uff0c\u5149\u9019\u9ede\u512a\u52e2\u4f60\u5c31\u53ef\u4ee5\u63db\u6389ESP8266\u4e86\u3002<\/p>\n\n\n\n<p>18 x Analog-to-Digital\uff1a\u53ef\u63a5\u985e\u6bd4\u6216\u6578\u4f4d\u611f\u6e2c(\u7c89\u7d05\u8272\u6a19\u793a)<br>3 x SPI interfaces(MOSI,MISO,SCK,SS)\uff1a\u9ad8\u901f\u8cc7\u6599\u50b3\u8f38 SD card, TFT, RFID(\u85cd\u8272\u6a19\u793a)<br>3 x UART interfaces\uff1a\u85cd\u82bd\u3001\u76f8\u6a5f(\u4e0d\u9650\u8173\u4f4d\u7de8\u865f)<br>2 x I2C interfaces(SDA,SCL) and I2S interfaces\uff1aLCD\u3001\u6c23\u58d3\u3001\u9640\u87ba\u5100(GPIO 21,22)<br>16 x PWM output channels\uff1a\u6578\u4f4d\u8f38\u51fa\u4e5f\u53ef\u985e\u6bd4\u8f38\u51fa(\u4e0d\u9650\u5b9a\u8173\u4f4d\u7de8\u865f\uff0c\u4f46\u9700\u8981\u5ba3\u544achannel)<br>2 x Digital-to-Analog Converters (DAC)\uff1a\u4e0d\u592a\u9700\u8981\u7528<br>10 x Capacitive sensing GPIOs\uff1a\u63d0\u4f9b\u89f8\u63a7\u96fb\u5bb9(\u68d5\u8272\u6a19\u793a)<br>GPIO 34,35,36,39\uff1aInput only\uff08\u4e0d\u80fd\u4f5c\u70ba\u8f38\u51fa\u8173\u4f4d\uff09<br>GPIO 0,6,7,8,9,10,11\uff1a\u7cfb\u7d71\u7528\uff0c\u52ff\u4f7f\u7528(\u6dfa\u7070\u8272\u6a19\u793a)<br>GPIO 18\uff1a\u91cd\u958b\u6a5f<br>\u9084\u6709\u4e00\u4e9b\u500b\u4eba\u9047\u5230\u7684\u554f\u984c\uff08\u4e0d\u6e05\u695a\u539f\u56e0\uff0c\u4f46\u6703\u641e\u6b7b\u4f60\uff09<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li id=\"htoc-dht11-gpio-5-261\">DHT11\u4e0d\u53ef\u4ee5\u7528GPIO 5\u300126<\/li>\n\n\n\n<li id=\"htoc-gpio-12-2-3-wifi-2-4-12-13-14-15-25-26-271\">GPIO 12, 2\u71d2\u9304\u6642\u4e0d\u53ef\u63a5\u4efb\u4f55\u88dd\u7f6e\uff0c\u8acb\u7a7a\u63a5\uff0c\u71d2\u9304\u5b8c\u6210\u5f8c\uff0c\u518d\u63a5\u56de\uff0c\u5426\u5247\u6703\u4e0a\u50b3\u5931\u6557\u3002<br>3.WiFi\u555f\u52d5\u5f8c\uff0c2,4,12,13,14,15,25,26,27\u50c5\u80fd\u6578\u4f4d\u8b80\u53d6\uff0c\u4e0d\u53ef\u985e\u6bd4<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-arduino-ide\">Arduino IDE \u7de8\u8f2f\u5de5\u5177\u5b89\u88dd<\/h2>\n\n\n\n<p>IDE\u5de5\u5177\u4e0b\u8f09\uff1a \u8acb\u81f3<a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\">https:\/\/www.arduino.cc\/en\/Main\/Software<\/a>\u7db2\u7ad9\u4e0b\u8f09\uff0c\u7b46\u8005\u6bd4\u8f03\u5efa\u8b70\u76f4\u63a5\u4e0b\u8f09\u514d\u5b89\u88dd\u6a94\uff08\u5982\u4e0b\u5716\uff1aWindows ZIP for non admin install\uff09\uff0c\u89e3\u58d3\u7e2e\u5f8c\u76f4\u63a5\u53ef\u7528\uff0c\u56e0\u70ba\u9019\u6a23\u7684\u7a0b\u5f0f\u53ef\u4ee5\u5e36\u8457\u8d70\uff0c\u4e0d\u9700\u8981\u5b89\u88dd\uff0c\u672a\u4f86\u96fb\u8166\u66f4\u65b0\u6216\u5347\u7d1a\u4e5f\u53ef\u4ee5\u76f4\u63a5\u958b\u555f\uff0c\u751a\u81f3\u653e\u5728USB\u90fd\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714617-2145926322.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:840px;height:345px\"\/><figcaption class=\"wp-element-caption\">\u4e0b\u8f09\u5f8c\uff0c\u76f4\u63a5\u89e3\u58d3\u7e2e\u5230C:\u6216D:\u5e95\u4e0b\u90fd\u53ef\u4ee5\u4f7f\u7528\uff0c\u6574\u500b\u8def\u5f91\u5efa\u8b70\u4e0d\u8981\u6709\u4efb\u4f55\u4e2d\u6587\u3002<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714658-1569908470.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:840px;height:430px\"\/><figcaption class=\"wp-element-caption\">\u6b64\u8655\u9078\u64c7Just Download\uff0c\u53e6\u5916\u4e00\u500b\u9078\u9805\u5247\u662f\u6350\u737bArduino\u57fa\u91d1\u6703\u3002<\/figcaption><\/figure>\n\n\n\n<p>\u4e0b\u8f09\u5b8c\u6210\u5f8c\uff0c\u627e\u5230\u4e0b\u8f09\u7684\u58d3\u7e2e\u6a94\uff0c\u9078\u64c7\u89e3\u300c\u58d3\u7e2e\u6240\u6709\u6a94\u6848\u300d\uff0c\u76f4\u63a5\u5c07\u58d3\u7e2e\u6a94\u89e3\u58d3\u7e2e\u5230C:\\\u6216D:\\\u8ddf\u76ee\u9304\u4e0b\uff0c\u4f8b\u5982\u7b46\u8005\u5e38\u653e\u5728C:\\\u4e4b\u4e0b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714700-3388635942.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:841px;height:625px\"\/><figcaption class=\"wp-element-caption\">\u5c07\u58d3\u7e2e\u6a94\u89e3\u58d3\u7e2e\u5230C:\\\u6216D:\\\u8ddf\u76ee\u9304\u4e0b<\/figcaption><\/figure>\n\n\n\n<p>\u7b49\u50193~5\u5206\u9418\u89e3\u58d3\u7e2e\u5b8c\u7562\u4e4b\u5f8c\uff0c\u6211\u5011\u53ef\u4ee5\u5728C:\\Arduino1.8.x\u4e0b\u627e\u5230\u4e3b\u7a0b\u5f0fArduino.exe\uff0c\u9019\u6a23\u4e3b\u7a0b\u5f0f\u5c31\u7b97\u5b89\u88dd\u5b8c\u7562\uff0c\u63a5\u4e0b\u4f86\u6e96\u5099\u5b89\u88ddESP32\u958b\u767c\u6838\u5fc3\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714706-4233254003.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:840px;height:752px\"\/><figcaption class=\"wp-element-caption\">\u5728C:\\Arduino1.8.x\u4e0b\u7684\u4e3b\u7a0b\u5f0fArduino.exe<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-esp321\">\u5b89\u88ddESP32\u6838\u5fc3\u7a0b\u5f0f<\/h2>\n\n\n\n<p>\u7531\u65bcESP32\u662fArduino\u76f8\u5bb9\u4e26\u975eArduino\u539f\u5ee0\u7522\u54c1\uff0c\u56e0\u6b64\u5fc5\u9808\u5728Arduino IDE\u4e2d\u5b89\u88ddESP32\u6838\u5fc3\u7a0b\u5f0f\uff0c\u9019\u6a23\u624d\u53ef\u4f7f\u7528Arduino IDE\u5bebESP32\u3002<\/p>\n\n\n\n<p>\u958b\u555fArduino IDE\u5f8c\uff0c\u9078\u64c7\u529f\u80fd\u8868\u7684\u6a94\u6848\/\u504f\u597d\u8a2d\u5b9a\uff0c\u958b\u555f\u504f\u597d\u8a2d\u5b9a\u8996\u7a97\uff0c\u5728addition boards manager URL\u8f38\u5165\u4ee5\u4e0b\u6587\u5b57\u5f8c\uff0c\u6309OK\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;dl.espressif.com\/dl\/package_esp32_index.json<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714850-1006666490.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:838px;height:567px\"\/><figcaption class=\"wp-element-caption\">\u5728Arduino IDE\u4e2d\u5b89\u88ddESP32\u6838\u5fc3\u7a0b\u5f0f<\/figcaption><\/figure>\n\n\n\n<p>\u63a5\u8457\u9ede\u9078\u5de5\u5177\/\u958b\u767c\u677f\/\u958b\u767c\u677f\u7ba1\u7406\u54e1\uff0c\u5373\u6703\u51fa\u73fe\u958b\u767c\u677f\u7ba1\u7406\u54e1\u8996\u7a97\uff0c\u5728\u958b\u767c\u677f\u7ba1\u7406\u54e1\u8996\u7a97\u4e2d\uff0c\u8f38\u5165\u95dc\u9375\u5b57ESP32\u5f8c\uff0c\u5373\u53ef\u7be9\u9078\u51faESP32\u6838\u5fc3\u5957\u4ef6\uff0c\u76ee\u524d\uff082020\/02\u6708\uff09\u6700\u65b0\u7248\u672c\u70ba1.0.4\uff0c\u76f4\u63a5\u9ede\u9078\u53f3\u5074\u7684\u5b89\u88dd\u6309\u9215\uff0c\u4e26\u7b49\u50195~10\u5206\u9418\u8b93\u7cfb\u7d71\u4e0b\u8f09\u6838\u5fc3\u5957\u4ef6\u4e26\u5b8c\u6210\u5b89\u88dd\uff0c\u6700\u5f8c\u518d\u95dc\u9589\u958b\u767c\u677f\u7ba1\u7406\u54e1\u8996\u7a97\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714883-2678836027.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:838px;height:755px\"\/><figcaption class=\"wp-element-caption\">\u5b89\u88ddESP32\u958b\u767c\u677f\u5957\u4ef6<\/figcaption><\/figure>\n\n\n\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9a5f\uff0c\u518d\u6b21\u9078\u64c7\u5de5\u5177\/\u958b\u767c\u677f\uff0c\u4e26\u5f80\u4e0b\u62c9\u5373\u53ef\u5728\u4e0b\u65b9\u627e\u5230\u6700\u65b0\u7684ESP32\u7cfb\u5217\u4e3b\u677f\uff0c\u63a5\u4e0b\u4f86\u5c31\u770b\u60a8\u8cb7\u7684\u662f\u54ea\u4e00\u7a2eESP32\u4e3b\u677f\u4f86\u9078\u64c7\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584714949-379224482.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:838px;height:717px\"\/><figcaption class=\"wp-element-caption\">\u9078\u64c7ESP32\u958b\u767c\u677f\u578b\u865f<\/figcaption><\/figure>\n\n\n\n<p>\u82e5\u60a8\u8cfc\u8cb7\u7684\u662fNodeMCU-32s\uff0c\u9078\u64c7\u6b63\u78ba\u7684\u7248\u672c\u5f8c\u6703\u51fa\u73fe\u4ee5\u4e0b\u756b\u9762\uff0c\u9664\u4e86\u5e8f\u5217\u57e0\u7a0d\u5f8c\u8981\u66f4\u6539\u4e4b\u5916\uff0c\u5176\u9918\u90fd\u8acb\u4fdd\u7559\u9810\u8a2d\u503c\u4e0d\u8981\u66f4\u52d5\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715020-3531030459.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:657px\"\/><figcaption class=\"wp-element-caption\">\u9078\u64c7\u578b\u865f\u5f8c\u9810\u8a2d\u503c\u756b\u9762<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-esp3211\">\u5b89\u88ddESP32\u9a45\u52d5\u7a0b\u5f0f<\/h2>\n\n\n\n<p>\u5b8c\u6210\u74b0\u5883\u8a2d\u5b9a\u5f8c\uff0c\u6211\u5011\u5c07\u8cfc\u8cb7\u7684ESP32\u63d2\u5165USB\uff0c\u6703\u767c\u73fe\u9700\u8981\u5b89\u88ddUSB\u9a45\u52d5\u7a0b\u5f0f\uff0c\u76ee\u524dESP32\u5927\u90e8\u5206\u63a1\u7528CH340\u6216\u8005CP2102\u8207\u96fb\u8166\u6e9d\u901a\u4e26\u4e0a\u50b3\u7a0b\u5f0f\uff0c\u50b3\u7d71UNO\u5247\u662fCH340\uff0c\u76ee\u524dwindows\u6216MAC\u7cfb\u7d71\u90fd\u6c92\u6709\u5167\u5efa\u9a45\u52d5\uff0c\u56e0\u6b64\u7576\u60a8\u63a5\u4e0aESP32\u7684USB\u5f8c\uff0c\u9084\u9700\u8981\u5b89\u88dd\u9a45\u52d5\u3002<\/p>\n\n\n\n<p>\u958b\u555f\u6a94\u6848\u7e3d\u7ba1\uff0c\u4e26\u5728\u672c\u6a5f\u4e0a\u6309\u53f3\u9375\/\u7ba1\u7406\uff0c\u53ef\u4ee5\u9032\u5165\u88dd\u7f6e\u7ba1\u7406\u54e1\u3002\u7531\u65bc\u5c1a\u672a\u5b89\u88dd\u9a45\u52d5\u7a0b\u5f0f\uff0c\u56e0\u6b64\u6703\u5217\u5728\u5176\u4ed6\u88dd\u7f6e\uff0c\u4f7f\u7528\u8005\u61c9\u8a72\u80fd\u627e\u5230\u9019\u500b\u524d\u65b9\u6709\u9a5a\u5606\u865f\u300c!\u300d\u7684USB to UART\u88dd\u7f6e\uff0c\u5c31\u662fArduino ESP32\u7684USB\u88dd\u7f6e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715071-4272758910.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:841px;height:467px\"\/><figcaption class=\"wp-element-caption\">\u88dd\u7f6e\u7ba1\u7406\u54e1\u5167\u7684USB to UART\u88dd\u7f6e\uff0c\u5c31\u662f\u5c1a\u672a\u5b89\u88dd\u9a45\u52d5\u7a0b\u5f0f\u7684Arduino ESP32<\/figcaption><\/figure>\n\n\n\n<p>\u82e5\u662fCH340\u8acb\u81f3\u9019\u88e1\u4e0b\u8f09\uff1a<a href=\"http:\/\/www.wch.cn\/download\/CH341SER_ZIP.html\">http:\/\/www.wch.cn\/download\/CH341SER_ZIP.html<\/a><\/p>\n\n\n\n<p>\u82e5\u662fCP2102\u8acb\u81f3\u9019\u88e1\u4e0b\u8f09\uff1a<a href=\"https:\/\/www.silabs.com\/developers\/usb-to-uart-bridge-vcp-drivers\">https:\/\/www.silabs.com\/developers\/usb-to-uart-bridge-vcp-drivers<\/a><\/p>\n\n\n\n<p>\u7531\u65bc\u5169\u8005\u5b89\u88dd\u65b9\u5f0f\u5927\u81f4\u76f8\u540c\uff0c\u56e0\u6b64\u9019\u88e1\u4ee5CH340\u70ba\u4f8b\uff0c\u4f9d\u7167\u60a8\u7684\u4f5c\u696d\u7cfb\u7d71\u5728\u7db2\u7ad9\u9ede\u9078\u4e0b\u8f09<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1629870222-1920477713-g_n.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:840px;height:476px\"\/><figcaption class=\"wp-element-caption\">\u4e0b\u8f09CH340\u9a45\u52d5\u7a0b\u5f0f<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1629870264-964168296-g_n.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:841px;height:547px\"\/><figcaption class=\"wp-element-caption\">\u4e0b\u8f09\u5f8c\uff0c\u57f7\u884c\u4e26\u76f4\u63a5install\u5b89\u88dd<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1629870298-3643676523-g_n.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:540px\"\/><figcaption class=\"wp-element-caption\">\u5b89\u88dd\u5b8c\u6210<\/figcaption><\/figure>\n\n\n\n<p>\u63a5\u8457\u67e5\u770b\u9023\u63a5\u57e0\u7684\u57e0\u865f\uff0c\u5728\u6211\u7684\u96fb\u8166\uff08\u672c\u6a5f\uff09\u4e0a\u6309\u53f3\u9375\uff0c\u4e26\u9ede\u9078\u7ba1\u7406\uff0c\u958b\u555f\u96fb\u8166\u7ba1\u7406\u8996\u7a97<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1629870375-3508617990-g_n.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:840px;height:862px\"\/><figcaption class=\"wp-element-caption\">\u958b\u555f\u96fb\u8166\u7ba1\u7406\u8996\u7a97<\/figcaption><\/figure>\n\n\n\n<p>\u9ede\u9078\u88dd\u7f6e\u7ba1\u7406\u54e1\uff0c\u82e5\u5b89\u88dd\u6b63\u78ba\u7684\u8a71\uff0c\u524d\u65b9\u7684\u9a5a\u5606\u865f\u6703\u6d88\u5931\uff0c\u4e26\u6703\u5c07\u88dd\u7f6e\u653e\u5728\u9023\u63a5\u57e0\u4e0b\uff0c\u6b64\u6642\u8981\u8a18\u5f97\u7d00\u9304\u4e00\u4e0b\u6700\u5f8c\u65b9\u7684COM\u7de8\u865f\u5594\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1629870388-4265381312-g_n.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:841px;height:771px\"\/><figcaption class=\"wp-element-caption\">\u67e5\u770b\u9023\u63a5\u57e0<\/figcaption><\/figure>\n\n\n\n<p>\u5b8c\u6210\u9a45\u52d5\u7a0b\u5f0f\u5b89\u88dd\uff0c\u518d\u56de\u5230Arduino IDE\u4e2d\uff0c\u6b64\u6642\u5728\u5de5\u5177\/\u958b\u767c\u677f\u7684\u5e8f\u5217\u57e0\u9078\u64c7\u53d6\u5f97\u6b63\u78ba\u7684COM\u7de8\u865f\uff08\u672c\u4f8b\u70baCOM3\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715212-1183523351.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:838px;height:643px\"\/><figcaption class=\"wp-element-caption\">\u5728Arduino IDE\u4e2d\u9078\u64c7\u5e8f\u5217\u57e0\u7de8\u865f<\/figcaption><\/figure>\n\n\n\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9a5f\u5373\u7b97\u5b8c\u6210\u958b\u767c\u74b0\u5883\u8a2d\u5b9a\uff0c\u63a5\u4e0b\u4f86\u6211\u5011\u5beb\u7b2c\u4e00\u500bHelloWorld\u6e2c\u8a66\u4e00\u4e0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"htoc-hello-world\">\u7a0b\u5f0f\u4e0a\u50b3\u6e2c\u8a66 Hello World !<\/h2>\n\n\n\n<p>\u5b8c\u6210\u74b0\u5883\u8a2d\u5b9a\u5f8c\uff0c\u5c31\u53ef\u4ee5\u4f86\u5beb\u7a0b\u5f0f\u6e2c\u8a66\u770b\u770b\uff0c\u7531\u65bcESP32\u7684\u8a9e\u6cd5\u5e7e\u4e4e\u8207Arduino UNO\u76f8\u540c \uff0c\u56e0\u6b64\u9019\u88e1\u5c31\u5148\u7528HelloWorld\u5148\u505a\u500b\u7c21\u55ae\u7df4\u7fd2\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u5728Setup()\u4e2d\u8f38\u5165Serial.begin(115200); \u6b64\u70ba\u5ba3\u544a\u5e8f\u5217\u50b3\u8f38\u9b91\u7387\u662f115200\uff08Baud\uff09\uff0c\u63a5\u8457\u5728Loop()\u4e2d\u8f38\u5165Serial.println(\u201cHello World!\u201d); \u53cadelay(1000);\uff0c\u4ee3\u8868\u6bcf1000ms\uff08=1 second\uff09\u5c31\u6703\u5728\u5e8f\u5217\u8996\u7a97\u5370\u51faHello World!\u3002\u5b8c\u6574\u7a0b\u5f0f\u5982\u4e0b\u5716\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup() {\n  \/\/ put your setup code here, to run once:\n  Serial.begin(115200);     \/\/\u555f\u52d5\u5e8f\u5217\u901a\u8a0a\u9b91\u7387115200\n  }\n\nvoid loop() {\n  \/\/ put your main code here, to run repeatedly:\n  Serial.println(\"Hello World!\");    \/\/\u5370\u51faHello World!\n  delay(1000);                       \/\/\u4f11\u606f\u4e00\u79d2(1\/1000)s\n  }<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715379-2805538266.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:838px;height:435px\"\/><figcaption class=\"wp-element-caption\">\u7a0b\u5f0f\u64b0\u5beb\u756b\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u63a5\u8457\u6211\u5011\u5c07\u7a0b\u5f0f\u4e0a\u50b3\u5230ESP32\uff0c\u9ede\u9078\u5de6\u4e0a\u7684\u2192\u7b26\u865f\uff0c\u5148\u6703\u8df3\u51fa\u4e00\u500b\u5b58\u6a94\u8996\u7a97\uff0c\u6211\u5011\u5148\u6309\u53d6\u6d88\u7565\u904e\u5b58\u6a94\uff0c\u7136\u5f8c\u7b49\u5019\u4e0b\u65b9\u8a0a\u606f\u5217\u51fa\u73fe\u9023\u7dda\u8a0a\u606f\u6642\uff1a<br>Connecting\u2026\u2026<strong><em>_\u2026\u2026<\/em><\/strong>\u2026\u2026<br>\u9577\u6309ESP32\u4e3b\u677f\u4e0a\u53f3\u4e0b\u7684IO0\u6309\u9215\uff08\u6709\u4e9b\u6703\u6a19\u793a\u70baBOOT\uff09\uff0c\u76f4\u5230\u51fa\u73fe\u4e0a\u50b3\u958b\u59cb\u518d\u653e\u958bIO0\uff0c\u6b64\u6309\u9215\u70ba\u5de5\u4f5c\u6a21\u5f0f\u5207\u63db\u9215\uff0c\u4e0a\u50b3\u7a0b\u5f0f\u6642\u90fd\u9700\u8981\u6309\u9019\u500b\u6309\u9215\u5c07ESP32\u7684\u300c\u5de5\u4f5c\u6a21\u5f0f\u300d\u8f49\u63db\u6210\u300c\u4e0b\u8f09\u6a21\u5f0f\u300d\uff0c\u6b64\u70ba\u4fdd\u8b77\u63aa\u65bd\uff0c\u907f\u514d\u7121\u610f\u9593\u8986\u84cb\u6389\u539f\u6709\u7684\u7a0b\u5f0f\u5167\u5bb9\uff0c\u4e0d\u904e\u6709\u4e9bESP32\u5df2\u7d93\u53d6\u6d88\u9019\u500b\u6a5f\u5236\uff0c\u7a31\u70ba\u4e00\u9375\u4e0b\u8f09\uff08\u6216\u4e00\u9375\u71d2\u9304\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715402-2446668787.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:602px\"\/><figcaption class=\"wp-element-caption\">\u7a0b\u5f0f\u4e0a\u50b3\u4e2d\u756b\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u7a0b\u5f0f\u66f4\u65b0\u4e2d\uff0c\u6703\u51fa\u73fe\u7a0b\u5f0f\u4e0a\u50b3\u7684%\u6578\uff0c\u63d0\u793a\u4f7f\u7528\u8005\u7a0b\u5f0f\u4e0a\u50b3\u9032\u5ea6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715412-1832096760.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:837px;height:611px\"\/><figcaption class=\"wp-element-caption\">\u7a0b\u5f0f\u4e0a\u50b3\u9032\u5ea6\u756b\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u4e0a\u50b3\u5b8c\u7562\u5247\u6703\u51fa\u73feHard resetting via RTS pin\u2026\uff0c\u610f\u601d\u662f\u5229\u7528\u5de6\u5074\u7684RST\u6309\u9215\u91cd\u958b\u6a5f\uff0c\u8b93ESP32\u91cd\u65b0\u958b\u6a5f\u4f86\u57f7\u884c\u7a0b\u5f0f\uff0c\u4e0d\u904e\u4e00\u822c\u6309RST\u9019\u500b\u6b65\u9a5f\u662f\u53ef\u4ee5\u7701\u7565\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715428-3987366596.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:602px\"\/><figcaption class=\"wp-element-caption\">\u7a0b\u5f0f\u4e0a\u50b3\u5b8c\u6210\u756b\u9762<\/figcaption><\/figure>\n\n\n\n<p>\u5b8c\u6210HelloWorld\u7a0b\u5f0f\u4e0a\u50b3\u5f8c\uff0c\u9ede\u9078\u53f3\u4e0a\u89d2\u7684\u653e\u5927\u93e1\u5716\u793a\u958b\u555f\u5e8f\u5217\u8996\u7a97\uff0c\u5373\u53ef\u770b\u5230\u4e00\u79d2\u4e00\u6b21\u7684\u300cHelloWorld!\u300d\u51fa\u73fe\u3002\u9019\u88e1\u8981\u6ce8\u610f\u7684\u662f\u5e8f\u5217\u8996\u7a97\u7684baud\u7387\u5fc5\u9808\u8207Serial.begin\u7684\u6578\u5b57\u76f8\u540c\uff0c\u624d\u6709\u8fa6\u6cd5\u986f\u793a\uff0c\u5426\u5247\u53ef\u80fd\u6703\u7a7a\u767d\uff0c\u6216\u662f\u4e82\u78bc\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715439-1026050253.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:602px\"\/><figcaption class=\"wp-element-caption\">\u958b\u555f\u5e8f\u5217\u8996\u7a97\uff0c\u8a2d\u5b9a115200 baud\u7387<\/figcaption><\/figure>\n\n\n\n<p>\u7d93\u7531\u4e0a\u8ff0\u7684\u8aaa\u660e\uff0cESP32\u78ba\u5be6\u53ef\u4ee5\u7531Arduino IDE\u9032\u884c\u958b\u767c\uff0c\u800c\u4e14\u8a9e\u6cd5\u3001\u611f\u6e2c\u5668\u90fd\u76f8\u540c\uff0c\u975e\u5e38\u5efa\u8b70\u7acb\u5373\u7121\u75db\u79fb\u8f49\u5230ESP32\u9663\u71df\uff0c\u5927\u91cf\u7684WiFi\u53ca\u85cd\u7259\u5c08\u6848\u7b49\u8457\u60a8\u6162\u6162\u958b\u767c\uff0c\u7531\u65bc\u7bc7\u5e45\u6709\u9650\uff0c\u5f8c\u7e8c\u7684WiFi\u53ca\u85cd\u7259\u61c9\u7528\uff0c\u5c07\u65bc\u4e0b\u4e00\u671f\u518d\u8a73\u8ff0\uff0c\u656c\u555f\u671f\u5f85\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715450-2786149850.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:839px;height:506px\"\/><figcaption class=\"wp-element-caption\">ESP32\u85cd\u7259\u9023\u7dda\u53ca\u667a\u6167\u5bb6\u96fb<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715458-1079084131.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:489px;height:322px\"\/><figcaption class=\"wp-element-caption\">ESP32 ThinkSpeak\u96f2\u7aef\u5716\u8868\u88fd\u4f5c<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/pic.pimg.tw\/youyouyou\/1584715477-1582319703.png?w=1290&#038;ssl=1\" alt=\"\" style=\"width:314px;height:325px\"\/><figcaption class=\"wp-element-caption\">LINE Notify\u4e32\u63a5<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"htoc-\" style=\"font-size:clamp(16.293px, 1.018rem + ((1vw - 3.2px) * 0.68), 25px);\">\u5ef6\u4f38\u95b1\u8b80<\/h4>\n\n\n\n<p class=\"has-background has-medium-font-size\" style=\"background-color:#f2f2f2\">\ud83d\udccc   <a rel=\"noreferrer noopener\" href=\"https:\/\/www.nmking.io\/index.php\/2022\/11\/17\/esp32_ch1-7\/\" target=\"_blank\">\u7b2c\u4e8c\u7bc7 ESP32\u7684Hello World<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESP32 \u5167\u5efa\u85cd\u7259\u53caWiFi \u5177\u96d9\u6838\u5fc3\u3001\u6df1\u5ea6\u7761\u7720\u3001\u9060\u7aef\u66f4\u65b0OTA \u7b49\u529f\u80fd\u53ef\u4ee5\u88dc\u8db3\u50b3\u7d71 Arduino \u7f3a\u4e4f\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":580,"comment_status":"open","ping_status":"open","sticky":true,"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,29],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32","category-esp32-started"],"blocksy_meta":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.nmking.io\/wp-content\/uploads\/2022\/11\/ESP32book.jpg?fit=503%2C693&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/112","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=112"}],"version-history":[{"count":28,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":2601,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions\/2601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/media\/580"}],"wp:attachment":[{"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nmking.io\/index.php\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}