{"id":68577,"date":"2020-05-13T00:48:48","date_gmt":"2020-05-12T16:48:48","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=68577"},"modified":"2020-05-13T00:48:50","modified_gmt":"2020-05-12T16:48:50","slug":"esp32%e5%af%b9%e6%af%94esp8266%ef%bc%8c%e4%bc%98%e7%82%b9%e7%bc%ba%e7%82%b9%e5%88%86%e5%88%ab%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2020\/05\/13\/68577.htm","title":{"rendered":"ESP32\u5bf9\u6bd4ESP8266\uff0c\u4f18\u70b9\u7f3a\u70b9\u5206\u522b\u662f\u4ec0\u4e48\uff1f"},"content":{"rendered":"\n<p>ESP32\u548cESP8266\u662f\u6027\u4ef7\u6bd4\u975e\u5e38\u9ad8\u7684Wi-Fi\u6a21\u5757\uff0c\u975e\u5e38\u9002\u5408\u7269\u8054\u7f51\uff08IoT\uff09\u9886\u57df\u7684DIY\u9879\u76ee\u3002<\/p>\n\n\n\n<p>\u4e24\u6b3e\u82af\u7247\u90fd\u5c5e\u4e8e32\u4f4d\u5904\u7406\u5668\u3002ESP32\u662f\u53cc\u6838160MHz\u81f3240MHz CPU\uff0c\u800cESP8266\u662f\u5355\u6838\u5904\u7406\u5668\uff0c\u8fd0\u884c\u9891\u7387\u4e3a80MHz\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e9bWiFi\u6a21\u5757\u90fd\u5e26\u6709GPIO\uff0c\u652f\u6301SPI\uff0cI2C\uff0cUART\u7b49\u5404\u79cd\u534f\u8bae\u3002\u6700\u597d\u7684\u90e8\u5206\u662f\u5b83\u4eec\u5e26\u6709\u65e0\u7ebf\u7f51\u7edc\uff0c\u8fd9\u4f7f\u5f97\u5b83\u4eec\u4e0eArduino\u7b49\u5176\u4ed6\u5fae\u63a7\u5236\u5668\u533a\u522b\u5f00\u6765\u3002\u8fd9\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u901a\u8fc7Wi-Fi\u6216\u84dd\u7259\uff08ESP32\uff09\u4ee5\u6781\u4f4e\u7684\u4ef7\u683c\u8f7b\u677e\u5730\u8fdc\u7a0b\u63a7\u5236\u548c\u76d1\u63a7\u8bbe\u5907\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a rel=\"nofollow\" href=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/1-64.jpg\"><img decoding=\"async\" src=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/1-64-500x252.jpg\" alt=\"\" class=\"wp-image-398160\"\/><\/a><\/figure><\/div>\n\n\n\n<p><strong>\u89c4\u683c\uff1aESP32 vs ESP8266<\/strong><\/p>\n\n\n\n<p>\u8be5ESP32\u662fESP8266\u7ee7\u4efb\u8005\u3002\u5b83\u589e\u52a0\u4e86\u989d\u5916\u7684CPU\u5185\u6838\uff0c\u66f4\u5feb\u7684Wi-Fi\uff0c\u66f4\u591a\u7684GPIO\uff0c\u5e76\u652f\u6301\u84dd\u72594.2\u548c\u84dd\u7259\u4f4e\u529f\u8017\u3002\u6b64\u5916\uff0cESP32\u914d\u6709\u89e6\u6478\u611f\u5e94\u9488\u811a\uff0c\u53ef\u7528\u4e8e\u5524\u9192ESP32\u6df1\u5ea6\u7761\u7720\uff0c\u5185\u7f6e\u970d\u5c14\u6548\u5e94\u4f20\u611f\u5668\u548c\u5185\u7f6e\u6e29\u5ea6\u4f20\u611f\u5668\u3002<\/p>\n\n\n\n<p>\u4e24\u5757\u677f\u90fd\u975e\u5e38\u4fbf\u5b9c\uff0c\u4f46ESP32\u7684\u6210\u672c\u7565\u9ad8\u3002\u867d\u7136ESP32\u7684\u552e\u4ef7\u5927\u7ea6\u57286\u7f8e\u5143\u523012\u7f8e\u5143\u4e4b\u95f4\uff0c\u4f46ESP8266\u7684\u552e\u4ef7\u5374\u57284\u7f8e\u5143\u52306\u7f8e\u5143\u4e4b\u95f4\uff08\u4f46\u8fd9\u53d6\u51b3\u4e8e\u4f60\u83b7\u5f97\u5b83\u4eec\u7684\u4f4d\u7f6e\uff09\u3002<\/p>\n\n\n\n<p><strong>ESP32\u4e0a\u6709\u66f4\u591aGPIO<\/strong><\/p>\n\n\n\n<p>\u8be5ESP32\u6709\u66f4\u591a\u7684GPIO\u6bd4ESP8266\uff0c\u4f60\u53ef\u4ee5\u51b3\u5b9a\u54ea\u4e9b\u5f15\u811aUART\uff0cI2C\uff0cSPI -\u4f60\u53ea\u9700\u8981\u8bbe\u7f6e\u7684\u4ee3\u7801\u3002\u8fd9\u662f\u53ef\u80fd\u7684\uff0c\u56e0\u4e3aESP32\u82af\u7247\u7684\u591a\u8def\u590d\u7528\u529f\u80fd\u5141\u8bb8\u4f60\u4e3a\u540c\u4e00\u4e2a\u5f15\u811a\u5206\u914d\u591a\u4e2a\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u6ca1\u6709\u5728\u4ee3\u7801\u4e0a\u8bbe\u7f6e\u5b83\u4eec\uff0c\u5b83\u4eec\u5c06\u4f4d\u4e8e\u9ed8\u8ba4\u5b9a\u4e49\u7684\u5f15\u811a\u4e0a\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff08\u8fd9\u662fESP32 DEVKIT V1 DOIT\u677f\u7684\u793a\u4f8b &#8211; \u5f15\u811a\u4f4d\u7f6e\u53ef\u80fd\u56e0\u5236\u9020\u5546\u800c\u5f02\uff09\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a rel=\"nofollow\" href=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/2-62.jpg\"><img decoding=\"async\" src=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/2-62-500x361.jpg\" alt=\"\" class=\"wp-image-398161\"\/><\/a><\/figure><\/div>\n\n\n\n<p><strong>PWM\uff0cADC\u7b49<\/strong><\/p>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u5728\u4efb\u4f55GPIO\u4e2d\u8bbe\u7f6ePWM\u4fe1\u53f7\uff0c\u5e76\u5728\u4ee3\u7801\u4e0a\u8bbe\u7f6e\u53ef\u914d\u7f6e\u7684\u9891\u7387\u548c\u5360\u7a7a\u6bd4\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u6a21\u62df\u5f15\u811a\uff0c\u8fd9\u4e9b\u662f\u9759\u6001\u7684\uff0c\u4f46ESP32\u652f\u630118\u4e2a\u901a\u9053\uff08\u6a21\u62df\u4f7f\u80fd\u5f15\u811a\uff09\u4e0a\u7684\u6d4b\u91cf\uff0c\u800cESP8266\u53ea\u6709\u4e00\u4e2a10\u4f4dADC\u5f15\u811a\u3002ESP32\u8fd8\u652f\u6301\u4e24\u4e2a8\u4f4dDAC\u901a\u9053\u3002<\/p>\n\n\n\n<p>\u6b64\u5916\uff0cESP32\u5305\u542b10\u4e2a\u7535\u5bb9\u611f\u5e94GPIO\uff0c\u53ef\u68c0\u6d4b\u89e6\u6478\u5e76\u53ef\u7528\u4e8e\u89e6\u53d1\u4e8b\u4ef6\uff0c\u6216\u5524\u9192ESP32\u6df1\u5ea6\u7761\u7720\u3002<\/p>\n\n\n\n<p><strong>Arduino IDE &#8211; ESP32 vs ESP8266<\/strong><\/p>\n\n\n\n<p>ESP32\u548cESP8266\u677f\u7684\u7f16\u7a0b\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\u3002\u76ee\u524d\uff0c\u53ef\u4ee5\u4f7f\u7528Arduino IDE\u7f16\u7a0b\u73af\u5883\u5bf9\u4e24\u4e2a\u677f\u8fdb\u884c\u7f16\u7a0b\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a rel=\"nofollow\" href=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/3-17.png\"><img decoding=\"async\" src=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/3-17.png\" alt=\"\" class=\"wp-image-398162\"\/><\/a><\/figure><\/div>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4ef6\u597d\u4e8b\uff0c\u7279\u522b\u9002\u5408\u90a3\u4e9b\u4e60\u60efArduino\u7f16\u7a0b\u5e76\u719f\u6089Arduino\u7f16\u7a0b\u8bed\u8a00\u7684\u4eba\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528Arduino IDE\u5f00\u59cb\u4f7f\u7528ESP32\u6216ESP8266\u5e76\u8ba9\u4f60\u7684\u7b2c\u4e00\u4e2a\u9879\u76ee\u8fd0\u884c\u975e\u5e38\u7b80\u5355\u3002\u7f51\u4e0a\u6709\u975e\u5e38\u591a\u7684\u6307\u5357\u64cd\u4f5c\uff1a\u6bd4\u5982\u5728Arduino IDE\u4e2d\u5b89\u88c5ESP32\u677f\uff08Windows\u8bf4\u660e\uff09\uff1b\u5728Arduino IDE\u4e2d\u5b89\u88c5ESP32\u677f\uff08Mac\u548cLinux\u8bf4\u660e\u4e66\uff09\uff1b\u5982\u4f55\u5728Arduino IDE\u4e2d\u5b89\u88c5ESP8266\u677f\u7b49\u3002<\/p>\n\n\n\n<p>\u867d\u7136\u4f60\u53ef\u4ee5\u4f7f\u7528Arduino IDE\u5bf9\u4e24\u4e2a\u677f\u8fdb\u884c\u7f16\u7a0b\uff0c\u4f46\u5b83\u4eec\u53ef\u80fd\u4e0e\u76f8\u540c\u7684\u5e93\u548c\u547d\u4ee4\u4e0d\u517c\u5bb9\u3002\u6709\u4e9b\u5e93\u53ea\u4e0e\u5176\u4e2d\u4e00\u4e2a\u677f\u517c\u5bb9\u3002\u8fd9\u610f\u5473\u7740\u5927\u591a\u6570\u65f6\u5019\u4f60\u7684ESP8266\u4ee3\u7801\u4e0eESP32\u4e0d\u517c\u5bb9\u3002\u4f46\u662f\uff0c\u901a\u5e38\u4f60\u53ea\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u4fee\u6539\u3002<\/p>\n\n\n\n<p><strong>MicroPython Firwmare &#8211; ESP32 vs ESP8266<\/strong><\/p>\n\n\n\n<p>\u53e6\u4e00\u79cd\u5bf9ESP32\u548cESP8266\u677f\u8fdb\u884c\u7f16\u7a0b\u7684\u6d41\u884c\u65b9\u6cd5\u662f\u4f7f\u7528MicroPython\u56fa\u4ef6\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a rel=\"nofollow\" href=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/4-16.png\"><img decoding=\"async\" src=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/4-16.png\" alt=\"\" class=\"wp-image-398163\"\/><\/a><\/figure><\/div>\n\n\n\n<p>MicroPython\u662f\u9488\u5bf9\u5fae\u63a7\u5236\u5668\u548c\u5d4c\u5165\u5f0f\u7cfb\u7edf\u7684Python 3\u7684\u91cd\u65b0\u5b9e\u73b0\u3002MicroPython\u4e0e\u5e38\u89c4Python\u975e\u5e38\u76f8\u4f3c\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u5df2\u7ecf\u77e5\u9053\u5982\u4f55\u4f7f\u7528Python\u7f16\u7a0b\uff0c\u90a3\u4e48\u4f60\u4e5f\u77e5\u9053\u5982\u4f55\u5728MicroPython\u4e2d\u7f16\u7a0b\u3002<\/p>\n\n\n\n<p>\u5728MicroPython\u4e2d\uff0c\u5927\u591a\u6570Python\u811a\u672c\u90fd\u4e0e\u4e24\u4e2a\u677f\u517c\u5bb9\uff08\u4e0e\u4f7f\u7528Arduino IDE\u65f6\u4e0d\u540c\uff09\u3002\u8fd9\u610f\u5473\u7740\u5927\u591a\u6570\u65f6\u5019\u4f60\u53ef\u4ee5\u4e3aESP32\u548cESP8266\u4f7f\u7528\u76f8\u540c\u7684\u811a\u672c\u3002<\/p>\n\n\n\n<p><strong>\u6240\u4ee5\uff0c\u6b64\u65f6\u4f60\u5e94\u8be5\u95ee\uff1a \u6211\u5e94\u8be5\u4e70ESP8266\u8fd8\u662fESP32\uff1f<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a rel=\"nofollow\" href=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/5-14.png\"><img decoding=\"async\" src=\"https:\/\/www.eeboard.com\/wp-content\/uploads\/2019\/08\/5-14-500x201.png\" alt=\"\" class=\"wp-image-398164\"\/><\/a><\/figure><\/div>\n\n\n\n<p>\u8fd9\u771f\u7684\u53d6\u51b3\u4e8e\u4f60\u60f3\u505a\u4ec0\u4e48\u3002\u4e24\u5757\u677f\u90fd\u6709\u4f7f\u7528\u7684\u4ef7\u503c\uff0c\u4e24\u8005\u90fd\u6709\u5229\u6709\u5f0a\u3002<\/p>\n\n\n\n<p>ESP8266\u6bd4ESP32\u4fbf\u5b9c\u3002\u867d\u7136\u5b83\u6ca1\u6709\u90a3\u4e48\u591a\u7684\u529f\u80fd\uff0c\u4f46\u5bf9\u5927\u591a\u6570\u7b80\u5355\u7684DIY\u7269\u8054\u7f51\u9879\u76ee\u6765\u8bf4\u6548\u679c\u90fd\u4e0d\u9519\u3002\u6b64\u5916\uff0c\u7531\u4e8e\u5b83\u201c\u8f83\u65e7\u201d\uff0c\u56e0\u6b64\u5728\u8f6f\u4ef6\u65b9\u9762\u53d7\u5230\u66f4\u591a\u652f\u6301\uff0c\u4f60\u53ef\u80fd\u4f1a\u66f4\u5bb9\u6613\u627e\u5230\u5e2e\u52a9\u3002\u4f46\u662f\uff0c\u5b83\u5728GPIO\u6620\u5c04\u65b9\u9762\u6709\u4e00\u4e9b\u9650\u5236\uff0c\u5b83\u53ef\u80fd\u6ca1\u6709\u8db3\u591f\u7684\u5f15\u811a\u7528\u4e8e\u4f60\u6253\u7b97\u6267\u884c\u7684\u64cd\u4f5c\u3002\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u4f60\u5e94\u8be5\u4f7f\u7528ESP32\u3002<\/p>\n\n\n\n<p>ESP32\u6bd4ESP8266 \u529f\u80fd\u66f4\u5f3a\u5927\uff0c\u5305\u542b\u66f4\u591a\u5177\u6709\u591a\u79cd\u529f\u80fd\u7684GPIO\uff0c\u66f4\u5feb\u7684Wi-Fi\uff0c\u5e76\u4e14\u8fd8\u652f\u6301\u84dd\u7259\u3002\u5f88\u591a\u4eba\u8ba4\u4e3aESP32\u6bd4ESP8266\u66f4\u96be\u5904\u7406\uff0c\u56e0\u4e3a\u5b83\u66f4\u590d\u6742\u3002\u5728\u6211\u4eec\u770b\u6765\uff0cESP32\u7f16\u7a0b\u4e0eESP8266\u4e00\u6837\u5bb9\u6613\uff0c\u7279\u522b\u662f\u5982\u679c\u4f60\u6253\u7b97\u7528Arduino\u8bed\u8a00\u6216MicroPython\u7f16\u7a0b\u5b83\u3002<\/p>\n\n\n\n<p>\u53e6\u4e00\u65b9\u9762\uff0cESP32\u4e5f\u6709\u4e00\u4e9b\u7f3a\u70b9\u3002\u9996\u5148\uff0c\u5b83\u6bd4ESP8266\u8d35\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5236\u4f5c\u4e00\u4e2a\u7b80\u5355\u7684\u7269\u8054\u7f51\u9879\u76ee\uff0c\u90a3\u4e48ESP8266\u53ef\u80fd\u4f1a\u4ee5\u66f4\u4f4e\u7684\u4ef7\u683c\u6210\u529f\u3002\u6b64\u5916\uff0c\u7531\u4e8e\u5b83\u6bd4ESP8266\u66f4\u65b0\uff0c\u5e76\u975e\u6240\u6709\u8f6f\u4ef6\u90fd\u662f\u4e3a\u4e86\u5145\u5206\u5229\u7528ESP32\u529f\u80fd\u800c\u5f00\u53d1\u7684\uff0c\u56e0\u6b64\u652f\u6301\u66f4\u5c11\uff0c\u9519\u8bef\u66f4\u591a\u3002\u4f46\u4ece\u957f\u8fdc\u6765\u770b\uff0c\u8fd9\u4e9b\u95ee\u9898\u5c06\u5f97\u5230\u89e3\u51b3\uff0c\u4e24\u4e2a\u5f00\u53d1\u677f\u90fd\u5c06\u6709\u5404\u81ea\u5e94\u7528\u7684\u7a7a\u95f4\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESP32\u548cESP8266\u662f\u6027\u4ef7\u6bd4\u975e\u5e38\u9ad8\u7684Wi-Fi\u6a21\u5757\uff0c\u975e\u5e38\u9002\u5408\u7269\u8054\u7f51\uff08IoT\uff09\u9886\u57df\u7684DIY\u9879\u76ee\u3002 \u4e24\u6b3e\u82af\u7247\u90fd\u5c5e\u4e8e32\u4f4d\u5904\u7406\u5668\u3002ESP32\u662f\u53cc\u6838160MHz\u81f3240MHz CPU\uff0c\u800cESP8266\u662f\u5355\u6838\u5904\u7406\u5668\uff0c\u8fd0\u884c\u9891\u7387\u4e3a80MHz\u3002 \u8fd9\u4e9b&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[462,458],"topic":[],"class_list":["post-68577","post","type-post","status-publish","format-standard","hentry","category-moshuiping","tag-esp32","tag-esp8266"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=68577"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68577\/revisions"}],"predecessor-version":[{"id":68578,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68577\/revisions\/68578"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=68577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=68577"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=68577"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=68577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}