{"id":557,"date":"2020-01-20T22:09:47","date_gmt":"2020-01-20T14:09:47","guid":{"rendered":"http:\/\/www.benblue.cn\/?p=557"},"modified":"2021-06-01T16:55:32","modified_gmt":"2021-06-01T08:55:32","slug":"esp32-and-micropython","status":"publish","type":"post","link":"http:\/\/www.benblue.cn\/?p=557","title":{"rendered":"G01\u3001Esp32  microPython\u5b89\u88c5 python VsCode \u7b49\u5de5\u5177\u5305"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"557\" class=\"elementor elementor-557\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-117f7ba elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"117f7ba\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a93b5c9\" data-id=\"a93b5c9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b78da01 elementor-widget elementor-widget-heading\" data-id=\"b78da01\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u5b89\u88c5python3.*<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9079511 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9079511\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-32ac462\" data-id=\"32ac462\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c4881cc elementor-widget elementor-widget-heading\" data-id=\"c4881cc\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u5b89\u88c5VsCode<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-27bafbc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"27bafbc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-029e45c\" data-id=\"029e45c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b55dc12 elementor-widget elementor-widget-text-editor\" data-id=\"b55dc12\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u7565<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-05ba0f6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"05ba0f6\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-757ba78\" data-id=\"757ba78\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f169a10 elementor-widget elementor-widget-heading\" data-id=\"f169a10\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u5b89\u88c5cp2102\u9a71\u52a8\u7a0b\u5e8f<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7ee15ff elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7ee15ff\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-20d0b35\" data-id=\"20d0b35\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5beb2a0 elementor-widget elementor-widget-text-editor\" data-id=\"5beb2a0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u4e0b\u8f7d\u5b89\u88c5\uff1acp2102\u7684\u9a71\u52a8\u7a0b\u5e8f<\/p><p><a href=\"https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers\">https:\/\/www.silabs.com\/products\/development-tools\/software\/usb-to-uart-bridge-vcp-drivers<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4af72d7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4af72d7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-062ca31\" data-id=\"062ca31\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4ebce40 elementor-widget elementor-widget-text-editor\" data-id=\"4ebce40\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u5728VSCode\u6253\u5f00\u865a\u62df\u7ec8\u7aef\u66f4\u65b0pip\uff1a<\/p><pre>python -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ --upgrade pip --user<\/pre><p>\u6216\u8005<\/p><pre>python3 -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ --upgrade pip --user<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-954435b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"954435b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-04b079b\" data-id=\"04b079b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-21ada76 elementor-widget elementor-widget-text-editor\" data-id=\"21ada76\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u5b89\u88c5\uff1aesptool\u5de5\u5177\uff0c\u7528\u4e8e\u64e6\u5199esp32<\/p><pre>python -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ esptool --user<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-499e48d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"499e48d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f4fa593\" data-id=\"f4fa593\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6d9c99a elementor-widget elementor-widget-text-editor\" data-id=\"6d9c99a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u4e0b\u8f7d\uff1amicroPython \u7684Firmware\u00a0 :<\/p><p>www.micropython.org<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-deea6c1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"deea6c1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d33333d\" data-id=\"d33333d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-876d3b1 elementor-widget elementor-widget-text-editor\" data-id=\"876d3b1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>\u63d2\u5165esp32 \u7136\u540e\u62b9\u53bb\u91cc\u9762\u7684\u5185\u5bb9<\/h5><p>win10<\/p><pre>c:\\users\\linux\\appdata\\roaming\\python\\python38\\site-packages\\esptool.py --chip esp32 --port COM3 erase_flash<\/pre><p>linux\/macOS<\/p><p>\u9996\u5148\u8fdb\u5165\u60a8\uff1aesptool\u7684\u5b89\u88c5\u76ee\u5f55<\/p><pre>cd ~\/Library\/Python\/3.8\/lib\/python\/site-packages\n<\/pre><p>\u64e6\u9664esp32<\/p><pre>python3 esptool.py --port \/dev\/tty.SLAB_USBtoUART --chip esp32 erase_flash\n<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b201ab1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b201ab1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b5168c8\" data-id=\"b5168c8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2dd2664 elementor-widget elementor-widget-text-editor\" data-id=\"2dd2664\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>\u5199\u5165 Firmware:<\/h5>\nwin10\n<pre>c:\\users\\linux\\appdata\\roaming\\python\\python38\\site-packages\\esptool.py --chip esp32 --port COM3 write_flash -z 0x1000 C:\\Users\\linux\\Downloads\\esp32-idf4-20200120-v1.12-68-g3032ae115.bin<\/pre>\n\nlinux\/macOS\n<pre>python3 esptool.py --port  \/dev\/tty.SLAB_USBtoUART --chip esp32 write_flash 0x1000 \/Users\/macbook\/downloads\/esp32-idf4-20200215-v1.12-167-gf020eac6a.bin<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-dadc81b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dadc81b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ac75b06\" data-id=\"ac75b06\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-816c93e elementor-widget elementor-widget-text-editor\" data-id=\"816c93e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\u5b89\u88c5 rshell\n<pre>python -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ rshell --user<\/pre>\n\u6216\u8005\n<pre>python3 -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ rshell --user<\/pre>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-32f9ba4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"32f9ba4\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-34588d3\" data-id=\"34588d3\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f4e21fe elementor-widget elementor-widget-text-editor\" data-id=\"f4e21fe\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h5>\u8fde\u63a5ESP32<\/h5>\nwin10\n<pre>\u00a0c:\\users\\linux\\appdata\\roaming\\python\\python38\\site-packages\\rshell\\main.py -p COM3<\/pre>\n\nlinux\/macOS\n<pre>\u00a0python3 .\/rshell\/main.py -p \/dev\/tty.SLAB_USBtoUART<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4477ea8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4477ea8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2d75649\" data-id=\"2d75649\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c9db434 elementor-widget elementor-widget-text-editor\" data-id=\"c9db434\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>\u5b89\u88c5\uff1a<\/p><pre>python -m pip install -i https:\/\/mirrors.aliyun.com\/pypi\/simple\/ virtualenv --user<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-560e734 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"560e734\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b97cc02\" data-id=\"b97cc02\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-dabd618 elementor-widget elementor-widget-text-editor\" data-id=\"dabd618\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>VsCode for Python:<\/p><p>\u00a0<\/p><p>\u6309\u4e0b\u5feb\u6377\u952eCtrl+Shift+X\uff0c\u8fdb\u5165\u63d2\u4ef6\u7ba1\u7406\u9875\u9762<\/p><p>\u641c\u7d22\uff1apython<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0900b62 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0900b62\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1e7ff12\" data-id=\"1e7ff12\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f63133c elementor-widget elementor-widget-text-editor\" data-id=\"f63133c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<pre>repl<\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5python3.* \u5b89\u88c5VsCode \u7565 \u5b89\u88c5cp2102\u9a71\u52a8\u7a0b\u5e8f \u4e0b\u8f7d\u5b89\u88c5\uff1acp2102\u7684\u9a71\u52a8\u7a0b\u5e8f ht [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/posts\/557"}],"collection":[{"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=557"}],"version-history":[{"count":21,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions"}],"predecessor-version":[{"id":675,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=\/wp\/v2\/posts\/557\/revisions\/675"}],"wp:attachment":[{"href":"http:\/\/www.benblue.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=557"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.benblue.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}