{"id":21070709,"url":"https://github.com/microbit-foundation/pxt-microbit-ml","last_synced_at":"2025-03-14T02:42:34.756Z","repository":{"id":239045724,"uuid":"798352717","full_name":"microbit-foundation/pxt-microbit-ml","owner":"microbit-foundation","description":"Microsoft MakeCode extension for use with the micro:bit machine learning tool","archived":false,"fork":false,"pushed_at":"2024-09-05T13:40:24.000Z","size":257,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-05T20:45:14.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/microbit-foundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-09T15:53:15.000Z","updated_at":"2024-09-05T13:40:27.000Z","dependencies_parsed_at":"2024-06-10T19:37:58.120Z","dependency_job_id":"ee84935b-e593-4e83-8af6-406365a0cf45","html_url":"https://github.com/microbit-foundation/pxt-microbit-ml","commit_stats":null,"previous_names":["microbit-foundation/pxt-ml-extension-poc","microbit-foundation/pxt-microbit-ml"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fpxt-microbit-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fpxt-microbit-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fpxt-microbit-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microbit-foundation%2Fpxt-microbit-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microbit-foundation","download_url":"https://codeload.github.com/microbit-foundation/pxt-microbit-ml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243513794,"owners_count":20303009,"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-11-19T18:47:53.922Z","updated_at":"2025-03-14T02:42:34.734Z","avatar_url":"https://github.com/microbit-foundation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microsoft MakeCode extension for use with micro:bit CreateAI\n\nThis extension is leveraged by micro:bit CreateAI which creates suitable blocks based on the machine learning model you build in the app. It is not useful separate from micro:bit CreateAI.\n\n## Building locally\n\nEnsure you have the required toolchain to build for V1 and V2\n(arm-none-eabi-gcc, python, yotta, cmake, ninja, srec_cat) or docker.\n\n```bash\ngit clone https://github.com/microbit-foundation/pxt-microbit-ml\ncd pxt-microbit-ml\nnpm install pxt --no-save\nnpx pxt target microbit --no-save\nnpx pxt install\nPXT_FORCE_LOCAL=1 PXT_NODOCKER=1 npx pxt\n```\n\nFor the V1 build Yotta can hit the GitHub rate limits quite easily if the\nproject is built from a clean state more than once.\nA V2-only build can be performed with the `PXT_COMPILE_SWITCHES=csv---mbcodal`\nenvironmental variable.\n\n```\nPXT_FORCE_LOCAL=1 PXT_NODOCKER=1 PXT_COMPILE_SWITCHES=csv---mbcodal npx pxt\n```\n\n## Build flags\n\n### Model predictions per second\n\nBy default the model will run every 250 ms, to change this value the\n`ML_INFERENCE_PERIOD_MS` config can be modified.\n\n```json\n{\n  \"yotta\": {\n    \"config\": {\n      \"ML_INFERENCE_PERIOD_MS\": 250\n    }\n  }\n}\n```\n\n### Debug messages\n\nTo enable debug print from this extension, add the following into your\npxt.json file:\n\n```json\n{\n  \"yotta\": {\n    \"config\": {\n      \"ML_DEBUG_PRINT\": 1\n    }\n  }\n}\n```\n\n## Translations\n\nWe manage translations via Crowdin.\n\n#### Incorporting changes from Crowdin\n\nUse [update-translations.sh](./bin/update-translations.sh).\n\nBuild and download the Crowdin zip and unzip it to a temporary location. Note the zip itself doesn't contain a top-level directory, so on Mac/Linux use e.g. `unzip -d ~/tmp/trans microbit-org.zip`. Run the script passing the directory containing the unzipped translations.\n\nThe script will update the extension UI and sim strings.\n\n## License\n\nThis software made available under the MIT open source license.\n\n[SPDX-License-Identifier: MIT](/LICENSE)\n\n## Code of Conduct\n\nTrust, partnership, simplicity and passion are our core values we live and breathe in our daily work life and within our projects. Our open-source projects are no exception. We have an active community which spans the globe and we welcome and encourage participation and contributions to our projects by everyone. We work to foster a positive, open, inclusive and supportive environment and trust that our community respects the micro:bit code of conduct. Please see our [code of conduct](https://www.microbit.org/safeguarding/) which outlines our expectations for all those that participate in our community and details on how to report any concerns and what would happen should breaches occur.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrobit-foundation%2Fpxt-microbit-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrobit-foundation%2Fpxt-microbit-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrobit-foundation%2Fpxt-microbit-ml/lists"}