{"id":849,"date":"2021-05-17T11:26:09","date_gmt":"2021-05-17T03:26:09","guid":{"rendered":"https:\/\/104.es\/?p=849"},"modified":"2021-05-17T11:26:09","modified_gmt":"2021-05-17T03:26:09","slug":"nodemcu-python-01","status":"publish","type":"post","link":"https:\/\/104.es\/index.php\/2021\/05\/17\/nodemcu-python-01\/","title":{"rendered":"NodeMCU\u7684Python\u958b\u767c\u6307\u5357\uff08\u4e00\uff09\u7c21\u4ecb"},"content":{"rendered":"\n<p>NodeMCU\u662f\u4e00\u6b3e\u5177\u5099WiFi\u9023\u7dda\u80fd\u529b\u7684\u55ae\u6676\u7247\u958b\u767c\u677f\uff08\u4f7f\u7528\u7684\u662fESP8266 wifi-soc\uff09\uff0c\u96d6\u7136\u5e02\u9762\u4e0a\u6709\u8a31\u591a\u7684\u578b\u5f0f\uff0c\u4f46\u662f\u57fa\u672c\u4e0a\u529f\u80fd\u4ee5\u53ca\u64cd\u4f5c\u65b9\u6cd5\u5927\u81f4\u76f8\u540c\u3002\u5b83\u7684\u50f9\u683c\u4fbf\u5b9c\uff08\u4e0d\u5230\u53f0\u5e63300\u5143\uff09\uff0c\u57f7\u884c\u901f\u5ea6\u4e0d\u6162\uff0c\u9084\u652f\u63f4Lau\u3001Arduino IDE C\/C++\u3001\u4ee5\u53caMicroPython\u7684\u958b\u767c\u65b9\u5f0f\uff0c\u975e\u5e38\u9069\u5408\u719f\u6089C\/C++\u6216\u662fPython\u8a9e\u8a00\u7684\u521d\u5b78\u8005\u4f7f\u7528\uff0c\u800c\u4e14\u7531\u65bc\u5176\u5177\u6709WiFi\u9023\u7db2\u80fd\u529b\uff0c\u53ea\u8981\u82b1\u4e00\u4e9b\u6642\u9593\u719f\u6089\u5176\u958b\u767c\u7684\u6d41\u7a0b\u4ee5\u53ca\u958b\u767c\u677f\u7684\u7279\u6027\uff0c\u5c31\u53ef\u4ee5\u8f15\u6613\u5730\u505a\u51fa\u975e\u5e38\u591a\u7684\u61c9\u7528\u5c08\u984c\u3002\u5728\u9019\u4e00\u7cfb\u5217\u7684\u8ab2\u7a0b\u4e2d\uff0c\u6211\u5011\u5c07\u4ee5\u4e0b\u9762\u9019\u4e00\u500b\u958b\u767c\u677f\u70ba\u5c0d\u8c61\uff0c\u793a\u7bc4\u5982\u4f55\u4ee5Python\u8a9e\u8a00\u9032\u884c\u9023\u7dda\u53ca\u958b\u767c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-\u5d4c\u5165\u5167\u5bb9 wp-block-embed-\u5d4c\u5165\u5167\u5bb9\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"h5k4NzPllq\"><a href=\"https:\/\/www.taiwaniot.com.tw\/product\/nodemcu-lua-wifi-v3-%e7%89%a9%e8%81%af%e7%b6%b2-%e9%96%8b%e7%99%bc%e6%9d%bf-esp8266-wifi%e6%a8%a1%e7%b5%84-%e4%b8%b2%e5%8f%a3cp2102\/\">NodeMcu Lua V3 ESP-12N ESP8266 WiFi\u7269\u806f\u7db2\u958b\u767c\u677f CP2102<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"NodeMcu Lua V3 ESP-12N ESP8266 WiFi\u7269\u806f\u7db2\u958b\u767c\u677f CP2102 &#8212; \u53f0\u7063\u7269\u806f\u79d1\u6280 TaiwanIOT Studio\" src=\"https:\/\/www.taiwaniot.com.tw\/product\/nodemcu-lua-wifi-v3-%e7%89%a9%e8%81%af%e7%b6%b2-%e9%96%8b%e7%99%bc%e6%9d%bf-esp8266-wifi%e6%a8%a1%e7%b5%84-%e4%b8%b2%e5%8f%a3cp2102\/embed\/#?secret=h5k4NzPllq\" data-secret=\"h5k4NzPllq\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u958b\u767cNodeMCU\u7684\u610f\u601d\uff0c\u5c31\u662f\u628a\u60f3\u8981NodeMCU\u9032\u884c\u7684\u5de5\u4f5c\u900f\u904e\u7a0b\u5f0f\u7de8\u5beb\u597d\u4e86\u4e4b\u5f8c\uff0c\u518d\u5132\u5b58\u5230NodeMCU\u7684\u8a18\u61b6\u9ad4\u4e2d\uff0c\u800c\u56e0\u70ba\u8a18\u9304\u4e4b\u5f8c\u5c31\u6c38\u4e45\u6703\u5132\u5b58\u4e0b\u4f86\uff0c\u56e0\u6b64\u9019\u500b\u884c\u70ba\u6211\u5011\u901a\u5e38\u628a\u5b83\u53eb\u505a\u300c\u71d2\u9304\u300d\u3002\u53ef\u4ee5\u7528\u4f86\u7de8\u5bebNodeMCU\u7684\u7a0b\u5f0f\u6709\u8a31\u591a\u7a2e\u9078\u64c7\uff0c\u6700\u5e38\u898b\u7684\u662fLau\uff0c\u5176\u6b21\u662fC\/C++\uff0c\u73fe\u5728\u4e5f\u6709\u5f88\u591a\u4eba\u4f7f\u7528Python\u4f86\u505a\u70ba\u958b\u767cNodeMCU\u7684\u8a9e\u8a00\u3002\u672c\u7cfb\u5217\u5373\u4ee5MicroPython\u70ba\u958b\u767c\u8a9e\u8a00\uff0c\u9032\u884c\u4e00\u7cfb\u5217\u7684\u793a\u7bc4\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u525b\u958b\u59cb\u62ff\u5230\u9019\u584a\u958b\u767c\u677f\u7684\u6642\u5019\uff0c\u6709\u4ee5\u4e0b\u5e7e\u500b\u6b65\u9a5f\u8981\u5b8c\u6210\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5b89\u88ddUSB\u9a45\u52d5\u7a0b\u5f0f\uff0c\u4e0d\u540c\u7684\u677f\u5b50\u9700\u8981\u4e0d\u540c\u7684\u9a45\u52d5\u7a0b\u5f0f\uff0c\u4e3b\u8981\u6709CH340\u548cCP2102\u5169\u7a2e\u3002\u4e0d\u904e\u5728\u65b0\u7248\u7684Windows 10\u4f5c\u696d\u7cfb\u7d71\u4e2d\uff0c\u4f5c\u696d\u7cfb\u7d71\u4f3c\u4e4e\u53ef\u4ee5\u81ea\u52d5\u5b8c\u6210\u9a45\u52d5\u7a0b\u5f0f\u7684\u5b89\u88dd\u3002\u53ea\u8981\u628a\u677f\u5b50\u548c\u96fb\u8166\u5229\u7528USB\u9023\u63a5\u8d77\u4f86\uff0c\u5982\u679c\u80fd\u5728\u88dd\u7f6e\u4e2d\u770b\u5230COM\u9023\u63a5\u57e0\u7684\u865f\u78bc\uff0c\u5c31\u4ee3\u8868\u9a45\u52d5\u7a0b\u5f0f\u5df2\u5b89\u88dd\u5b8c\u6210\u3002<\/li><li>\u5728\u672c\u6a5f\u7aef\u9700\u8981\u6709\u53ef\u4ee5\u57f7\u884c\u7684Python\u74b0\u5883\u3002\u5efa\u8b70\u76f4\u63a5\u5b89\u88ddAnaconda\uff0c\u4e26\u4ee5Anaconda Prompt\u9032\u884c\u5177\u6709Python\u74b0\u5883\u7684\u547d\u4ee4\u63d0\u793a\u5b57\u5143\u3002<\/li><li>\u3010\u7b2c\u4e00\u6b21\u4f7f\u7528\u3011\u4e0b\u8f09MicroPython\u97cc\u9ad4\uff0c\u4e0b\u8f09\u7db2\u5740\u5728\u6b64\uff1a<a rel=\"noreferrer noopener\" href=\"http:\/\/micropython.org\/download\/#esp8266\" target=\"_blank\">http:\/\/micropython.org\/download\/#esp8266<\/a>\u3002<\/li><li>\u3010\u7b2c\u4e00\u6b21\u4f7f\u7528\u3011\u5b89\u88ddPython\u71d2\u9304\u5de5\u5177\uff08esptool\uff09\u4ee5\u53ca\u6a94\u6848\u4e0a\u50b3\u5de5\u5177\uff08adafruit-ampy\uff09\u3002<\/li><li>\u3010\u7b2c\u4e00\u6b21\u4f7f\u7528\u3011\u71d2\u9304MicroPython\u97cc\u9ad4\u3002<\/li><li>\u3010\u9078\u7528\u3011\u5728Windows\u96fb\u8166\u4e2d\u5b89\u88dd PuTTY\uff0c\u4e32\u5217\u57e0\u9023\u7dda\u5de5\u5177\u3002<\/li><li>\u5728Windows\u96fb\u8166\u4e2d\u5b89\u88dd\u7a0b\u5f0f\u7de8\u8f2f\u5668\uff08\u5982Sublime Text \u6216 Notepad++\u7b49\uff09\uff0c\u7de8\u8f2f\u7a0b\u5f0f\u518d\u4e0a\u50b3\u3002<\/li><li>\u4e5f\u53ef\u4ee5\u5229\u7528\u300cMu Editor\u300d\u7684REPL\u529f\u80fd\uff0c\u5373\u6642\u9023\u7dda\u5230NodeMCU\u4e2d\u9032\u884c\u6e2c\u8a66\u3002<\/li><\/ol>\n\n\n\n<p>\u4ee5\u4e0b\u6709\u5b8c\u6574\u7684\u539f\u6587\u8cc7\u8a0a\uff0c\u63d0\u4f9b\u7d66\u5927\u5bb6\u53c3\u8003\uff1a<\/p>\n\n\n\n<p>https:\/\/docs.micropython.org\/en\/latest\/esp8266\/tutorial\/intro.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u958b\u767cNodeMCU\u7684\u610f\u601d\uff0c\u5c31\u662f\u628a\u60f3\u8981NodeMCU\u9032\u884c\u7684\u5de5\u4f5c\u900f\u904e\u7a0b\u5f0f\u7de8\u5beb\u597d\u4e86\u4e4b\u5f8c\uff0c\u518d\u5132\u5b58\u5230NodeMCU\u7684\u8a18\u61b6\u9ad4\u4e2d\uff0c\u800c\u56e0\u70ba\u8a18\u9304\u4e4b\u5f8c\u5c31\u6c38\u4e45\u6703\u5132\u5b58\u4e0b\u4f86\uff0c\u56e0\u6b64\u9019\u500b\u884c\u70ba\u6211\u5011\u901a\u5e38\u628a\u5b83\u53eb\u505a\u300c\u71d2\u9304\u300d\u3002\u53ef\u4ee5\u7528\u4f86\u7de8\u5bebNodeMCU\u7684\u7a0b\u5f0f\u6709\u8a31\u591a\u7a2e\u9078\u64c7\uff0c\u6700\u5e38\u898b\u7684\u662fLau\uff0c\u5176\u6b21\u662fC\/C++\uff0c\u73fe\u5728\u4e5f\u6709\u5f88\u591a\u4eba\u4f7f\u7528Python\u4f86\u505a\u70ba\u958b\u767cNodeMCU\u7684\u8a9e\u8a00\u3002\u672c\u7cfb\u5217\u5373\u4ee5MicroPython\u70ba\u958b\u767c\u8a9e\u8a00\uff0c\u9032\u884c\u4e00\u7cfb\u5217\u7684\u793a\u7bc4\u64cd\u4f5c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"class_list":["post-849","post","type-post","status-publish","format-standard","hentry","category-nodemcu"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/comments?post=849"}],"version-history":[{"count":0,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/849\/revisions"}],"wp:attachment":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/media?parent=849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/categories?post=849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/tags?post=849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}