{"id":16320747,"url":"https://github.com/ntoll/microperi","last_synced_at":"2025-05-14T08:11:06.913Z","repository":{"id":66692844,"uuid":"60592934","full_name":"ntoll/microperi","owner":"ntoll","description":"MicroPeri is a library for using the BBC micro:bit with MicroPython as an external peripheral device or sensor, using an API which closely replicates the micro:bit's MicroPython API.","archived":false,"fork":false,"pushed_at":"2016-06-07T10:18:55.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T01:44:01.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/ntoll.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS"}},"created_at":"2016-06-07T07:44:34.000Z","updated_at":"2020-10-01T21:19:53.000Z","dependencies_parsed_at":"2024-01-07T18:07:19.283Z","dependency_job_id":null,"html_url":"https://github.com/ntoll/microperi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntoll%2Fmicroperi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntoll%2Fmicroperi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntoll%2Fmicroperi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntoll%2Fmicroperi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntoll","download_url":"https://codeload.github.com/ntoll/microperi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101559,"owners_count":22014908,"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":[],"created_at":"2024-10-10T22:45:21.023Z","updated_at":"2025-05-14T08:11:01.904Z","avatar_url":"https://github.com/ntoll.png","language":"Python","funding_links":[],"categories":["🐍 Python"],"sub_categories":["🐍 Python Libraries"],"readme":"===============================\nMicroPeri for the BBC micro:bit\n===============================\nMicroPeri is a quick and easy to use Python 3 library for turning the BBC Microbit into an external peripheral device or sensor for a normal Windows, Mac or Linux computer using MicroPython.\n\nWith it, you can quickly for example read accelerator values, button presses or even write to the LED matrix using the same API as is used with MicroPython.\n\nInstallation\n============\n1. You must first make sure you have a blank MicroPython .hex file loaded onto your Microbit. You can create one `here \u003chttps://www.microbit.co.uk/app/#create:xyelfe\u003e`_.\n2. If using Windows, you must have the ARM mbed USB serial driver installed. It can be downloaded from the `mbed site \u003chttps://developer.mbed.org/handbook/Windows-serial-configuration\u003e`_.\n3. Either install the library with (soon):\n\n    # pip3 install microperi\n\nOr just use it as a portable module with *zero* install. As long as the `microperi` directory is in the same one as your scripts which use it, you can use `import microperi` just as normal.\n\nYou also no longer need the Python 3 pyserial (serial) module installed on your system, as it comes bundled along with microperi (see `microperi/_portable_serial/LICENSE.txt \u003chttps://github.com/JoeGlancy/microperi/blob/master/microperi/_portable_serial/LICENSE.txt\u003e`_ for the pyserial copyright notice).\n\nNotes:\n======\n- Some functions and parts of the current micro:bit MicroPython API are not yet implemented - see the `issues page \u003chttps://github.com/JoeGlancy/microperi/issues\u003e`_ for more information.\n- If on Linux, you will need superuser priviledges to open the serial port, or your user needs to be in the `dialout` group.\n\nUsage\n=====\n.. code-block:: python\n\n    import microperi\n    # try to find the micro:bit automatically\n    device = microperi.Microbit()\n    microbit = device.microbit\n    microbit.display.scroll(\"Hello world\")\n    while True:\n        # is button A currently being pressed?\n        if microbit.button_a.is_pressed():\n            print(\"Button A is pressed\")\n        else:\n            print(\"Button A is not pressed\")\n        microbit.sleep(500)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntoll%2Fmicroperi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntoll%2Fmicroperi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntoll%2Fmicroperi/lists"}