{"id":15995358,"url":"https://github.com/finomnis/ws2812-flexio","last_synced_at":"2025-03-17T15:32:28.073Z","repository":{"id":173980513,"uuid":"651066881","full_name":"Finomnis/ws2812-flexio","owner":"Finomnis","description":"A neopixel driver for Rust, based on NXP i.MX RT's FlexIO bus.","archived":false,"fork":false,"pushed_at":"2024-06-29T08:24:48.000Z","size":128,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T01:18:42.911Z","etag":null,"topics":["embedded-rust","imxrt","neopixel"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Finomnis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.txt","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":"2023-06-08T12:21:24.000Z","updated_at":"2024-12-28T05:39:50.000Z","dependencies_parsed_at":"2024-05-30T09:31:08.871Z","dependency_job_id":"57152a67-0a3c-41c8-949c-df7c409d3ca2","html_url":"https://github.com/Finomnis/ws2812-flexio","commit_stats":null,"previous_names":["finomnis/ws2812-flexspi","finomnis/ws2812-flexio"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finomnis%2Fws2812-flexio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finomnis%2Fws2812-flexio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finomnis%2Fws2812-flexio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Finomnis%2Fws2812-flexio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Finomnis","download_url":"https://codeload.github.com/Finomnis/ws2812-flexio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869517,"owners_count":20361031,"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-rust","imxrt","neopixel"],"created_at":"2024-10-08T07:13:07.558Z","updated_at":"2025-03-17T15:32:27.690Z","avatar_url":"https://github.com/Finomnis.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ws2812-flexio\n\n[![Crates.io](https://img.shields.io/crates/v/ws2812-flexio)](https://crates.io/crates/ws2812-flexio)\n[![Crates.io](https://img.shields.io/crates/d/ws2812-flexio)](https://crates.io/crates/ws2812-flexio)\n[![License](https://img.shields.io/crates/l/ws2812-flexio)](https://github.com/Finomnis/ws2812-flexio/blob/main/LICENSE-MIT)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/Finomnis/ws2812-flexio/ci.yml)](https://github.com/Finomnis/ws2812-flexio/actions/workflows/ci.yml?query=branch%3Amain)\n[![docs.rs](https://img.shields.io/docsrs/ws2812-flexio)](https://docs.rs/ws2812-flexio)\n\n\nA neopixel driver based on NXP i.MX RT's FlexIO bus.\n\n## Pixel Type\n\nThe default color space of NeoPixel LED strips is 8-bit [linear sRGB](https://matt77hias.github.io/blog/2018/07/01/linear-gamma-and-sRGB-color-spaces.html), therefore the recommended pixel type is [`LinSrgb\u003cu8\u003e`](https://docs.rs/palette/latest/palette/type.LinSrgb.html).\n\nBe aware that this differs from normal, gamma corrected sRGB; a conversion has to take place.\nMore info can be found in the documentation of the [`palette`](https://docs.rs/palette) crate.\n\n## Operating Modes\n\nThis crate can operate either in blocking mode or in DMA driven asynchronous mode.\n\n## Specs\n\n### Parallel strips\n\n  The library can drive multiple strips in parallel. To be more specific, driving multiple strips from the same FlexIO instance requires `2 + 2 * strips` FlexIO timers, so a for example a FlexIO instance with `8` timers can drive `3` strips in parallel.\n\n### Framerate\n\n  The library drives the LED strips at 800kHz with a latch time of 300us. This gives us the following formula:\n\n  ```python\n  fps = 100,000 / ((num_pixels + 1) x bytes_per_pixel + 30)\n  ```\n\n  Example: For a strip with [332 SK6805 pixels](https://www.ipixelleds.com/index.php?id=923), we can achieve `100,000 / ((332 + 1) * 3 + 30) = 97.18` fps.\n\n  Be aware that this framerate is only realistic for DMA based writes; with blocking writes, additional time gets lost while the next frame gets computed.\n\n\n# Examples\n\n*- examples are intended for the [Teensy 4.0](https://www.pjrc.com/store/teensy40.html) board -*\n\n## Prerequisites\n\nThe following hardware is required for the examples:\n- A [Teensy 4.0](https://www.pjrc.com/store/teensy40.html) development board\n- A way to read the Teensy's UART, like a USB-UART-converter\n\nThe following software tools have to be installed:\n- Python3 (as `python3`, or modify `run.py` to use the `python` binary)\n- `llvm-objcopy`\n  - Install [`LLVM`](https://github.com/llvm/llvm-project/releases) tool suite\n- [`teensy-loader-cli`](https://www.pjrc.com/teensy/loader_cli.html)\n\n\n## Run\n\n- Connect the Teensy to PC via USB cable.\n- Run `cargo run --release --example triple_332`.\n- Read the output of the examples on the Teensy's UART.\n- Pin 6, 7 and 8 output data for NeoPixel RGB strips of length 332 each\n  (for example [P/N: S010332ZA3SA8](https://www.ipixelleds.com/index.php?id=923)).\n  Note that those pins output 3.3V, and most NeoPixel LED strips require a 5V data signal, which means an external level shifter is required.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinomnis%2Fws2812-flexio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinomnis%2Fws2812-flexio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinomnis%2Fws2812-flexio/lists"}