{"id":13802247,"url":"https://github.com/nickovs/ws2812-SPI","last_synced_at":"2025-05-13T13:30:24.119Z","repository":{"id":37706575,"uuid":"75437408","full_name":"nickovs/ws2812-SPI","owner":"nickovs","description":"An efficient micropython WS2812 (NeoPixel) driver","archived":false,"fork":false,"pushed_at":"2020-10-30T01:06:33.000Z","size":8,"stargazers_count":25,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-05T00:07:06.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/nickovs.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}},"created_at":"2016-12-02T22:56:54.000Z","updated_at":"2024-01-20T06:32:33.000Z","dependencies_parsed_at":"2022-09-09T13:11:43.087Z","dependency_job_id":null,"html_url":"https://github.com/nickovs/ws2812-SPI","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/nickovs%2Fws2812-SPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickovs%2Fws2812-SPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickovs%2Fws2812-SPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickovs%2Fws2812-SPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickovs","download_url":"https://codeload.github.com/nickovs/ws2812-SPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225218004,"owners_count":17439712,"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-08-04T00:01:40.214Z","updated_at":"2024-11-18T17:31:12.269Z","avatar_url":"https://github.com/nickovs.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Display"],"readme":"# ws2812-SPI\nAn efficient micropython WS2812 (NeoPixel) driver\n\nThis library allows for easy access to a set of WS2812 RGB LEDs\nattached to a microcontroller running\n[MicroPython](https://micropython.org) using an SPI port. This (at\nleast in theory) allows for more efficient and reliable delivery of\nthe data compared to using \"bit banging\" of a regular IO line.\n\nThe NeoPixel object can be treated as a 2D array, `pixel_count` long\nand 3 wide. Pixels can be accessed as a 3-tuple or through their\nindividual Green, Blue and Red components (in that order). It can also\nbe accessed with 1D slice operations to read or write a list of\n3-tuples and a single 3-tuple can be written to a whole slice to set a\nrow of pixels to the same value.\n\n```python\nsp = machine.SPI(1)\nsp.init(baudrate=3200000)\nnp = NeoPixel(sp, 100)\n\n# Blank the whole set\nnp[:] = (0,0,0)\n# Set the first 10 pixels to dark blue\nnp[0:10] = (0,0,40)\n# Set the second pixel to green\nnp[1] = (128,0,0)\n# Set the third pixel's red value to full brightness\nnp[2,2] = 255\n# Copy the 2nd pixel to the 5th\nnp[4] = np[1]\n# Copy the first 16 pixels to the last 16 pixels\nnp[-16:] = np[:16]\n# Send the data out to the pixels\nnp.write()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickovs%2Fws2812-SPI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickovs%2Fws2812-SPI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickovs%2Fws2812-SPI/lists"}