{"id":20279069,"url":"https://github.com/t-vk/ledmatrix","last_synced_at":"2025-08-10T07:06:30.197Z","repository":{"id":107367226,"uuid":"87716460","full_name":"T-vK/LedMatrix","owner":"T-vK","description":"LED Matrix library for the NodeMCU firmware. Written in Lua. Works with WS2812, WS2812b, APA104, SK6812 and possibly more","archived":false,"fork":false,"pushed_at":"2017-04-28T20:01:58.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T01:49:13.323Z","etag":null,"topics":["led-matrix","lua","nodemcu","rgb","ws2812b"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/T-vK.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":"2017-04-09T14:58:37.000Z","updated_at":"2018-03-30T01:45:06.000Z","dependencies_parsed_at":"2023-04-01T10:07:23.487Z","dependency_job_id":null,"html_url":"https://github.com/T-vK/LedMatrix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/T-vK/LedMatrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FLedMatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FLedMatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FLedMatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FLedMatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-vK","download_url":"https://codeload.github.com/T-vK/LedMatrix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FLedMatrix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267677340,"owners_count":24126313,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["led-matrix","lua","nodemcu","rgb","ws2812b"],"created_at":"2024-11-14T13:28:00.799Z","updated_at":"2025-07-29T11:09:46.591Z","avatar_url":"https://github.com/T-vK.png","language":"Lua","readme":"# LED Matrix Lua library for NodeMCU\n\n## Description\nThis library allows you to easily set pixels in an RGB or RGBW LED matrix.  \nIt is written in Lua and relies on the ws2812 module of NodeMCU.  \n\n## LED type support\n - WS2812\n - WS2812b\n - APA104\n - SK6812\n - possibly more\n\nBoth RGB and RGBW!\n \n## Set up\n - Connect the data pin of your LED strip to GPIO pin 2.  \n - Make sure your power supply can supply enough current to drive your LED strip properly and reliably.  \n - Connect your 5V power supplly to your LED strip.\n - Make sure your version of the NodeMCU firmware has the ws2812 module!!  \n - Upload all the lua files to your ESP8266 and include them in your init.lua, either by running dofile(...) on them or by literally pasting the file contents into `init.lua`. \n - Make sure `ws2812.init()` has been called before calling `newMatrix()`\n\n## Example \n\nTurns the LEDs at x/y-position 1|1 and 10|10 white:\n\n``` Lua\nws2812.init()\nlocal ledMatrixInstance = newLedMatrix(10, 10, true, true, false, true, true)\nledMatrixInstance:set(1,1,255,255,255) -- x,y,red,green,blue\nledMatrixInstance:set(10,10,255,255,255)\nledMatrixInstance:show()\n```\n\n## Documentation\n\n### newLedMatrix(width, height, isZigzag, isStartLedTop, isStartLedLeft, isRowLayout, isRgb)\n\nCreates a new LedMatrix instance.\n\n#### Parameters\n\n - `width`: the width of your matrix (number of pixels)\n - `height`: the height of your matrix (number of pixels) \n - `isZigzag`: `true` if you have a zigzag layout, `false` if you have a progressive layout\n \n    A Zigzag layout looks like this:  \n     ```\n     X -\u003e X -\u003e X\n               |\n     X \u003c- X \u003c- X\n     |\n     X -\u003e X -\u003e X\n     ```  \n     \n    A progressive layout looks like this:  \n     ```\n     X -\u003e X -\u003e X\n      _________|\n     |\n     X -\u003e X -\u003e X\n      _________|\n     |\n     X -\u003e X -\u003e X\n     ```\n \n - `isStartLedTop`: `true` if the first LED of your LED chain is in the very top row. `false` if it is in the very bottom row.\n - `isStartLedLeft`: `true` if the first LED of your LED chain is in the very left column. `false` if it is in the very right column.\n - `isRowLayout`: `true` if your LEDs are arranged in a row layout. `false` if your LEDs are arranged in a  column layout.\n - `isRgb`: `true` if your LEDs are RGB. `false` if your LEDs are RGBW.\n \n#### Returns\n\n - returns a new LedMatrix instance\n\n### Methods and properties of LedMatrix instances\n\n#### ledMatrixInstance:set(x,y,red,green,blue)\n\nParameters \n\n - `x and y` The coordinates of the pixel you want to change  \n - `red, green and blue` The components of the color you want to set the LED to. Must be between 0 and 255. 0 being off and 255 being the brightest.\n\nReturns\n\n- No return value\n\n#### ledMatrixInstance:show()\n\nSend the new colors to the LEDs\n\nParameters \n\n - No parameters\n\nReturns\n\n#### matrix\n\nInstance of the matrix class (not documented yet)\n\n#### ledCount\n\nNumber of LEDs in this matrix\n\n#### bytesPerLed\n\nNumber of bytes that each LED takes (will be 3 for RGB and 4 for RGBW)\n\n#### ledBuffer\n\nInstance of a ws2812 buffer. Documented [here](https://nodemcu.readthedocs.io/en/master/en/modules/ws2812/#ws2812newbuffer)    \nYou can use the buffer to create cool animations and also to find out which pixel is set to which color.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-vk%2Fledmatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-vk%2Fledmatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-vk%2Fledmatrix/lists"}