{"id":2471,"date":"2023-07-30T22:13:33","date_gmt":"2023-07-30T14:13:33","guid":{"rendered":"https:\/\/104.es\/?p=2471"},"modified":"2023-07-30T22:13:33","modified_gmt":"2023-07-30T14:13:33","slug":"microbit-micropython-starter","status":"publish","type":"post","link":"https:\/\/104.es\/index.php\/2023\/07\/30\/microbit-micropython-starter\/","title":{"rendered":"\u3010micro:bit\u3011\u958b\u59cb\u4f7f\u7528MicroPython"},"content":{"rendered":"\n<p>\u5728\u9810\u8a2d\u7684micro:bit\u7a0b\u5f0f\u8a2d\u8a08\u9078\u9805\u4e2d\uff0c\u7b2c\u4e00\u7a2e\u662f\u4ee5\u7a4d\u6728\u7684\u65b9\u5f0f\u4f86\u8a2d\u8a08\u7684MakeCode\uff0c\u7b2c\u4e8c\u7a2e\u9078\u64c7\u5247\u662f\u900f\u904ePython\u8a9e\u8a00\u4f86\u8a2d\u8a08\u7a0b\u5f0f\u7684MicroPython\uff0c\u5728\u5b98\u7db2\u4e2d\u53ef\u4ee5\u627e\u5230\u9019\u5169\u7a2e\u65b9\u5f0f\u7684\u4efb\u4f55\u4e00\u7a2e\u3002\u4f7f\u7528\u7a4d\u6728\u7684\u597d\u8655\u662f\u7c21\u55ae\u5bb9\u6613\u4e0a\u624b\uff0c\u4e0d\u9700\u8981\u8a18\u61b6\u4e00\u5927\u5806\u7a0b\u5f0f\u6307\u4ee4\uff0c\u800c\u4e14\u5728\u7de8\u8f2f\u74b0\u5883\u4e2d\u4e5f\u6709\u6a21\u64ec\u5668\u53ef\u4ee5\u99ac\u4e0a\u770b\u5230\u7a0b\u5f0f\u7a4d\u6728\u7684\u57f7\u884c\u7d50\u679c\uff0c\u4f46\u7f3a\u9ede\u662f\u4e0d\u5bb9\u6613\u5b8c\u6210\u8907\u96dc\u7684\u7a0b\u5f0f\uff0c\u56e0\u70ba\u96a8\u4fbf\u4e00\u4e9b\u529f\u80fd\u90fd\u6703\u5728\u756b\u9762\u4e0a\u51fa\u73fe\u4e00\u5927\u5806\u7a4d\u6728\uff0c\u5f88\u5feb\u5730\u5c31\u6703\u773c\u82b1\u64a9\u4e82\u4e86\uff0c\u800c\u4e14\uff0c\u4e5f\u4e0d\u5bb9\u6613\u8907\u88fd\u5225\u4eba\u7684\u6210\u679c\u52a0\u4ee5\u4fee\u6539\u3002\u56e0\u6b64\uff0c\u7576\u4f60\u7684\u7a0b\u5f0f\u8b8a\u5f97\u6bd4\u8f03\u5927\u4e00\u4e9b\u7684\u6642\u5019\uff0c\u5efa\u8b70\u53ef\u4ee5\u8003\u616e\u4f7f\u7528MicroPython\u4f86\u958b\u767c\u3002<\/p>\n\n\n\n<p>micro:bit\u5b98\u7db2\u7684MicroPython\u9032\u5165\u9ede\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222-1024x768.png\" alt=\"\" class=\"wp-image-2472\" srcset=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222-1024x768.png 1024w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222-300x225.png 300w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222-768x576.png 768w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222-600x450.png 600w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-222.png 1312w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Python\u7de8\u8f2f\u756b\u9762\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223-1024x768.png\" alt=\"\" class=\"wp-image-2473\" srcset=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223-1024x768.png 1024w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223-300x225.png 300w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223-768x576.png 768w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223-600x450.png 600w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223.png 1312w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5728Python\u7684\u7de8\u8f2f\u74b0\u5883\u4e2d\uff0c\u7b2c\u4e00\u6b21\u9032\u5165\u7684\u6642\u5019\u5373\u6709\u4e00\u500b\u793a\u7bc4\u7684\u7a0b\u5f0f\u53ef\u4ee5\u8b93\u4f60\u57f7\u884c\u770b\u770b\uff0c\u6240\u6709\u53ef\u4ee5\u57f7\u884c\u7684\u6307\u4ee4\u90fd\u5728\u7bad\u982d\u6240\u6307\u7684\u8aaa\u660e\u6309\u9215\u4e2d\uff0c\u9ede\u9078help\u6309\u9215\uff0c\u6709\u4e09\u500b\u9805\u76ee\u53ef\u4ee5\u9078\u64c7\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"312\" height=\"102\" src=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-224.png\" alt=\"\" class=\"wp-image-2474\" srcset=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-224.png 312w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-224-300x98.png 300w\" sizes=\"auto, (max-width: 312px) 100vw, 312px\" \/><\/figure>\n<\/div>\n\n\n<p>\u8acb\u9ede\u9078Documentation\uff0c\u5c31\u6703\u524d\u5f80MicroPython for micro:bit\u7684\u8aaa\u660e\u6587\u4ef6\u5b98\u7db2\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225-1024x768.png\" alt=\"\" class=\"wp-image-2475\" srcset=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225-1024x768.png 1024w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225-300x225.png 300w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225-768x576.png 768w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225-600x450.png 600w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-225.png 1312w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u60f3\u77e5\u9053\u6709\u4ec0\u9ebc\u6307\u4ee4\u53ef\u4ee5\u4f7f\u7528\uff0c\u6216\u662f\u57f7\u884c\u7684\u7bc4\u4f8b\u7a0b\u5f0f\uff0c\u5728\u4e0a\u9762\u7684\u7db2\u7ad9\u4e0a\u90fd\u53ef\u4ee5\u67e5\u8a62\u5f97\u5230\u3002\u5176\u5be6\uff0c\u6c42\u52a9\u4e5f\u4e0d\u4e00\u5b9a\u8981\u9032\u5165Python Editor\uff0c\u4f7f\u7528\u81ea\u5df1\u7684\u700f\u89bd\u5668\u524d\u5f80\u4ee5\u4e0b\u7684\u7db2\u5740\u4e5f\u662f\u4e00\u6a23\u7684\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/microbit-micropython.readthedocs.io\/en\/v1.0.1\/\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/microbit-micropython.readthedocs.io\/en\/v1.0.1\/\"><img decoding=\"async\" src=\"https:\/\/microbit-micropython.readthedocs.io\/favicon.ico\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p><a href=\"https:\/\/microbit-micropython.readthedocs.io\/en\/v1.0.1\/\">BBC micro:bit MicroPython documentation \u2014 BBC micro:bit MicroPython 1.0.1 documentation<\/a><\/p>\n\n\n\n<p>\u96d6\u7136\u5728micro:bit\u5b98\u7db2\u63d0\u4f9b\u7684Python\u7de8\u8f2f\u74b0\u5883\u9084\u7b97\u662f\u53ef\u7528\uff0c\u4f46\u662f\u5728\u700f\u89bd\u5668\u4e0a\u64cd\u4f5c\u7684\u6548\u7387\u7e3d\u662f\u6bd4\u4e0d\u4e0a\u5728\u4f5c\u696d\u7cfb\u7d71\u4e2d\u57f7\u884c\u7684\u5c08\u5c6c\u61c9\u7528\u7a0b\u5f0f\uff0c\u56e0\u6b64\uff0c\u8001\u5e2b\u9084\u662f\u5efa\u8b70\u4f60\u524d\u5f80\u4ee5\u4e0b\u7684\u7db2\u5740\u4e0b\u8f09\u597d\u7528\u7684Mu Editor\uff1a<\/p>\n\n\n\n<p><a href=\"https:\/\/codewith.mu\/\">https:\/\/codewith.mu\/<\/a><\/p>\n\n\n\n<p>\u57f7\u884c\u5b89\u88dd\u7684\u6642\u5019\u5225\u5fd8\u4e86\u8981\u628a\u4f60\u7684micro:bit\u9023\u63a5\u5230\u4f60\u7684\u96fb\u8166\uff0c\u9019\u6a23\u5b50\u7684\u8a71\uff0c\u5b83\u7684\u5b89\u88dd\u7a0b\u5f0f\u6703\u9806\u4fbf\u5e6b\u4f60\u5b89\u88dd\u4e0a\u53ef\u4ee5\u4f7f\u7528REPL\u7684USB\u9a45\u52d5\u7a0b\u5f0f\u5594\u3002\u4e0b\u9762\u662fMu Editor\u7684\u57f7\u884c\u756b\u9762\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"849\" src=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226-1024x849.png\" alt=\"\" class=\"wp-image-2476\" srcset=\"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226-1024x849.png 1024w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226-300x249.png 300w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226-768x637.png 768w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226-600x498.png 600w, https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-226.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7de8\u5beb\u597d\u4f60\u7684\u7a0b\u5f0f\u4e4b\u5f8c\uff0c\u53ef\u4ee5\u6309\u4e0b\u300cCheck\u300d\u6309\u9215\u6aa2\u67e5\u8a9e\u6cd5\u662f\u5426\u6b63\u78ba\uff0c\u6309\u4e0b\u300cFlash\u300d\u5373\u53ef\u628a\u7a0b\u5f0f\u5beb\u5165\u5230micro:bit\u4e0a\u57f7\u884c\u5594\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u9810\u8a2d\u7684micro:bit\u7a0b\u5f0f\u8a2d\u8a08\u9078\u9805\u4e2d\uff0c\u7b2c\u4e00\u7a2e\u662f\u4ee5\u7a4d\u6728\u7684\u65b9\u5f0f\u4f86\u8a2d\u8a08\u7684MakeCode\uff0c\u7b2c\u4e8c\u7a2e\u9078\u64c7\u5247\u662f\u900f\u904ePython\u8a9e\u8a00\u4f86\u8a2d\u8a08\u7a0b\u5f0f\u7684MicroPython\uff0c\u5728\u5b98\u7db2\u4e2d\u53ef\u4ee5\u627e\u5230\u9019\u5169\u7a2e\u65b9\u5f0f\u7684\u4efb\u4f55\u4e00\u7a2e\u3002\u4f7f\u7528\u7a4d\u6728\u7684\u597d\u8655\u662f\u7c21\u55ae\u5bb9\u6613\u4e0a\u624b\uff0c\u4e0d\u9700\u8981\u8a18\u61b6\u4e00\u5927\u5806\u7a0b\u5f0f\u6307\u4ee4\uff0c\u800c\u4e14\u5728\u7de8\u8f2f\u74b0\u5883\u4e2d\u4e5f\u6709\u6a21\u64ec\u5668\u53ef\u4ee5\u99ac\u4e0a\u770b\u5230\u7a0b\u5f0f\u7a4d\u6728\u7684\u57f7\u884c\u7d50\u679c\uff0c\u4f46\u7f3a\u9ede\u662f\u4e0d\u5bb9\u6613\u5b8c\u6210\u8907\u96dc\u7684\u7a0b\u5f0f\uff0c\u56e0\u70ba\u96a8\u4fbf\u4e00\u4e9b\u529f\u80fd\u90fd\u6703\u5728\u756b\u9762\u4e0a\u51fa\u73fe\u4e00\u5927\u5806\u7a4d\u6728\uff0c\u5f88\u5feb\u5730\u5c31\u6703\u773c\u82b1\u64a9\u4e82\u4e86\uff0c\u800c\u4e14\uff0c\u4e5f\u4e0d\u5bb9\u6613\u8907\u88fd\u5225\u4eba\u7684\u6210\u679c\u52a0\u4ee5\u4fee\u6539\u3002\u56e0\u6b64\uff0c\u7576\u4f60\u7684\u7a0b\u5f0f\u8b8a\u5f97\u6bd4\u8f03\u5927\u4e00\u4e9b\u7684\u6642\u5019\uff0c\u5efa\u8b70\u53ef\u4ee5\u8003\u616e\u4f7f\u7528MicroPython\u4f86\u958b\u767c\u3002<\/p>\n","protected":false},"author":1,"featured_media":2473,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11,15],"tags":[],"class_list":["post-2471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microbit","category-python"],"jetpack_featured_media_url":"https:\/\/104.es\/wp-content\/uploads\/2023\/07\/image-223.png","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/2471","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=2471"}],"version-history":[{"count":1,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/2471\/revisions"}],"predecessor-version":[{"id":2477,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/posts\/2471\/revisions\/2477"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/media\/2473"}],"wp:attachment":[{"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/media?parent=2471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/categories?post=2471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/104.es\/index.php\/wp-json\/wp\/v2\/tags?post=2471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}