{"id":25088723,"url":"https://github.com/bp7968h/embedded_microbit","last_synced_at":"2025-04-01T16:32:08.821Z","repository":{"id":271955585,"uuid":"860860740","full_name":"bp7968h/embedded_microbit","owner":"bp7968h","description":"Learning embedded rust using microbit","archived":false,"fork":false,"pushed_at":"2025-01-11T21:45:16.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T10:44:24.597Z","etag":null,"topics":["embedded","microbit","rust","rust-embedded"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bp7968h.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-21T11:10:49.000Z","updated_at":"2025-01-11T21:45:19.000Z","dependencies_parsed_at":"2025-01-11T01:45:25.669Z","dependency_job_id":"6f5fc21e-9666-46fb-b3d2-a0dea5e7d203","html_url":"https://github.com/bp7968h/embedded_microbit","commit_stats":null,"previous_names":["bp7968h/embedded_microbit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bp7968h%2Fembedded_microbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bp7968h%2Fembedded_microbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bp7968h%2Fembedded_microbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bp7968h%2Fembedded_microbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bp7968h","download_url":"https://codeload.github.com/bp7968h/embedded_microbit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246670577,"owners_count":20815006,"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":["embedded","microbit","rust","rust-embedded"],"created_at":"2025-02-07T10:40:20.546Z","updated_at":"2025-04-01T16:32:08.804Z","avatar_url":"https://github.com/bp7968h.png","language":"Rust","readme":"# Embedded Rust Discovery with micro:bit\nThis project follows the [Embedded Rust Discovery Book](https://docs.rust-embedded.org/discovery/microbit/index.html), focusing on learning and experimenting with Embedded Rust on the micro:bit platform, also added some of my own different experiments.\n\n## Project Overview\nThe purpose of this repository is to document and track progress as I work through the Embedded Discovery book, using the Rust programming language to program a micro:bit device. The repository contains various examples, exercises, and personal explorations as I learn how to write embedded software using Rust.\n\n## Branches Overview\nThis repository contains different branches, each corresponding to a specific chapter, example, or project code from the book or personal experiments. Each branch can be checked out and flashed onto the micro:bit.\n\n- **`main`**: The default branch contains the starting template or most recent examples.\n- **`led_roulette`**: This branch contains code that makes the LEDs on the micro:bit flash in a `roulette` pattern along the borders of the matrix.\n- **`led_spiral`**: This branch contains code that lights the LEDs in a `spiral` fashion, starting from the outer border and moving towards the inner LEDs.\n- **`uart`**: This branch contains code that makes microcontroller and pc to communicate using uart protocol. Below are the available binary:\n  - `uart-send`: Sends data from `micro-controller` to `pc`.\n  - `uart-receive`: Receives data from `pc` to `micro-controller` and prints to rtt console.\n  - `echo-server`: Two way communication, `micro-controller` acts as echo server, when data is send from pc via serial port, data is printed in rtt console, and echoed back to the `pc`.\nRun the above binary using the below command:\n```bash\n   # update the `bin-name` before running\n   cargo embed --bin \u003cbin-name\u003e --target thumbv7em-none-eabihf \n```\n\n## Getting Started\nTo get started with this project, ensure you have the following:\n\n### Prerequisites\n\n1. **Rust**: Make sure you have the Rust toolchain installed. Install Rust using [rustup](https://rustup.rs/), and add the target device.\n   ```bash\n   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n   rustup target add thumbv7em-none-eabihf\n   ```\n\n2. **cargo-embed**:  You will need cargo-embed for flashing the programs onto your micro. Install it via:\n    ```bash\n    cargo install cargo-embed\n    ```\n\n3. **GDB and OpenOCD**: You may also need GDB and OpenOCD to debug and flash (load to microcontoller) your code.\n4. **microbit**: Of course, you'll need a microbit board.\n\n## How to Flash the Code?\nBelow command will build and flash your microbit with the current code for microbit v2:\n```bash\n    cargo embed --features v2 --target thumbv7em-none-eabihf\n```\n\n## How to interact with serial device using keyboard?\nWe can use `minicom` to interact with the serial device using the keyboard. Below command tells `minicom` to open the serial device at `/dev/ttyACM0` and set its baud rate to 115200.\n```bash\n    # might need a config file at `~/.minirc.dfl` with respective configurations\n    minicom -D /dev/ttyACM0 -b 115200\n```\n\n## Learning Resources\nThis project follows along with the Discovery Book for embedded Rust:\n\n- [The Embedded Rust Discovery Book](https://docs.rust-embedded.org/discovery/microbit/index.html)\n- [The Embedded Rust Book](https://docs.rust-embedded.org/book/intro/index.html)\n- [The Rust Book](https://doc.rust-lang.org/book/)\n\n## Acknowledgements\nThanks to the Rust Embedded Working Group for creating and maintaining the Rust Embedded Books.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbp7968h%2Fembedded_microbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbp7968h%2Fembedded_microbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbp7968h%2Fembedded_microbit/lists"}