{"id":14437115,"url":"https://github.com/wendlers/atom-microbit-micropython","last_synced_at":"2025-05-07T11:44:41.603Z","repository":{"id":144979329,"uuid":"84118958","full_name":"wendlers/atom-microbit-micropython","owner":"wendlers","description":"Microbit Micropython support package for Atom editor","archived":false,"fork":false,"pushed_at":"2017-08-01T20:01:28.000Z","size":94,"stargazers_count":7,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-01T08:01:46.692Z","etag":null,"topics":["atom-package","microbit","micropython"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wendlers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-06T20:44:27.000Z","updated_at":"2019-02-01T10:02:12.000Z","dependencies_parsed_at":"2023-04-11T01:31:26.868Z","dependency_job_id":null,"html_url":"https://github.com/wendlers/atom-microbit-micropython","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wendlers%2Fatom-microbit-micropython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wendlers%2Fatom-microbit-micropython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wendlers%2Fatom-microbit-micropython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wendlers%2Fatom-microbit-micropython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wendlers","download_url":"https://codeload.github.com/wendlers/atom-microbit-micropython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229614596,"owners_count":18099062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom-package","microbit","micropython"],"created_at":"2024-08-31T08:00:23.410Z","updated_at":"2024-12-13T20:46:41.337Z","avatar_url":"https://github.com/wendlers.png","language":"JavaScript","readme":"# microbit-micropython package (Linux)\n\nAtom package to support [micropython](https://microbit-micropython.readthedocs.io/en/latest/)\ndevelopment on the [mircobit](http://microbit.org/).\n\n__!!! Please note, that this package only supports Linux (and most likely Mac) !!!__\n\nThe package offers the following features:\n\n* Flash Microbit with Micropython including the current Python file\n* Create firmware HEX including Micropyton and current Python file\n* Serial terminal to Micropython REPL\n* Directely execute selected Python code from editor on Microbit (without flashing)\n* Configurable trough settings\n\n![screenshot](https://raw.githubusercontent.com/wendlers/atom-microbit-micropython/master/doc/screen.png)\n\n## Prerequisites\n\nA working Python installation including the `pip` tool.\n\nFor combining the Python code with the Micropython firmware into a HEX\nfile and for flashing the firmware to the Microbit, the\n[uflash](https://github.com/ntoll/uflash) utility is used. To install it\nvia `pip`:\n\n    sudo pip install uflash\n\nAs an alternative for using uflash, pyOCD (and DAP-link) could be used. Thus,\nit is recommanded to install [pyOCD](https://github.com/mbedmicro/pyOCD)\ntoo via `pip` (note, it needs Python 2.7):\n\n    sudo pip2 install pyOCD\n\nFor the serial terminal to the REPL, you have the choice between `screen`,\n`miniterm.py` and `microrepl.py`. On Linux `screen` would be the best choice\n(and it most likely comes with your distro).\n\n__Note__: you only have to install one of the below!\n\nThe [microrepl](https://github.com/ntoll/microrepl) could be installed with\n`pip`:\n\n    sudo pip install microrepl\n\n`miniterm.py` is part of [pyserial](https://github.com/pyserial/pyserial),\nalso installable via `pip`:\n\n    sudo pip install pyserial\n\n### Optional\n\nTo have nice auto-completion when writing your Python code, I would recommend\ninstalling e.g. [autocomplete-python](https://atom.io/packages/autocomplete-python):\n\n    apm autocomplete-python\n\nAnd to make Python known about the Microbit specific classes, you might want\ninstall the dummy package:\n\n    sudo pip install microbit-dummy\n\n## Installation\n\nTo install this package from the package repository:\n\n    apm install microbit-micropython\n\nOr install from git:\n\n    cd $HOME/$MY_GIT_REPOS\n    git clone https://github.com/wendlers/atom-microbit-micropython\n\nChange into the newly cloned directory and link the package into your atom install:\n\n    cd atom-microbit-micropython\n    apm link\n\nNext, install required node packages:\n\n    apm install\n\nNow, when you start your atom next time, you will be asked to also install the atom dependencies.\n\n__Note__: this package will ask to install `termination`, `console-panel` and\n`tool-bar` packages as dependencies.\n\n## Usage\n\n* Connect your Microbit to your PC, make sure it is mounted as drive\n* Open a Python file containing your Micropython code\n* To open an REPL to the Microbit, call `Microbit Micropython: REPL` or\n  clicking on the terminal icon on the tool-bar (may take some seconds until\n  it is able to connect, be patient)\n* To flash your code open the desirec Python file in the editor and call\n  `Microbit Micropython: Flash`, or click the flash icon on the tool-bar\n* To directly execute Python code (without flashing), select the code in the\n  editor windows, right-click it and select `microbit: execute selected` (or\n  call `Microbit Micropython: Execute Selected`, or click the tool-bar icon\n  with the triangle).\n\n### Known Issues\n\n* Runs only on Linux (maybe on Mac too)\n* Sometimes, when switching from REPL to direct script execution, the serial\n  line seams to get messed up leading to \"double echo\" in the REPL and\n  timeout errors in direct script execution. In this case a hard-reset (by\n  using the button on the board) seams to be the only thing that fixes it.\n\n### Trouble Shooting\n\n* Flash target was not found: auto-detection of `uflash` is not working in all\n  cases. Try specifying the path to your Microbit drive in the settings.\n* REPL not connecting: Maybe your port is not `/dev/ttyACM0`. Try specifying the\n  correct port in the settings.\n\n### Improvements\n\n* Monitor the flashing process:\n  - check when HEX file is gone on drive\n  - check error file\n","funding_links":[],"categories":["编程"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendlers%2Fatom-microbit-micropython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwendlers%2Fatom-microbit-micropython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwendlers%2Fatom-microbit-micropython/lists"}