{"id":19945644,"url":"https://github.com/frozenassassine/ws2812-controller","last_synced_at":"2026-02-11T23:03:55.921Z","repository":{"id":111126037,"uuid":"443878420","full_name":"FrozenAssassine/WS2812-Controller","owner":"FrozenAssassine","description":"A library to control WS2812-RGB leds with an AVR-device","archived":false,"fork":false,"pushed_at":"2024-07-06T14:44:39.000Z","size":2040,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-27T12:13:34.214Z","etag":null,"topics":["avr","cpp","led","music-reactive","rgb","ws2812","ws2812b"],"latest_commit_sha":null,"homepage":"","language":"C++","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/FrozenAssassine.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":"2022-01-02T21:56:16.000Z","updated_at":"2024-10-26T19:31:22.000Z","dependencies_parsed_at":"2024-11-13T00:38:46.014Z","dependency_job_id":null,"html_url":"https://github.com/FrozenAssassine/WS2812-Controller","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/FrozenAssassine/WS2812-Controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FWS2812-Controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FWS2812-Controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FWS2812-Controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FWS2812-Controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrozenAssassine","download_url":"https://codeload.github.com/FrozenAssassine/WS2812-Controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrozenAssassine%2FWS2812-Controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29349259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["avr","cpp","led","music-reactive","rgb","ws2812","ws2812b"],"created_at":"2024-11-13T00:26:20.405Z","updated_at":"2026-02-11T23:03:55.905Z","avatar_url":"https://github.com/FrozenAssassine.png","language":"C++","readme":"# WS2812-Controller\nA library to control the WS2812-RGB led with an AVR-device\n\n### How to use in Microchip Studio:\n- Create a new C++ Executable project\n- Select the chip you wanna use\n- To add the library to your project, rightclick on your project in Solutionexplorer (Ctrl + Alt + L) -\u003e Add -\u003e Existing Item. Now locate the WS2812.h file on your pc.\n   \n- To test if it works, you can use following sample code:\n```cpp\n#define F_CPU 8000000\n#include \u003cavr/io.h\u003e\n#include \u003cutil/delay.h\u003e\n\n//define output pin and port\n#define RGB_OutputPort PORTB\n#define RGB_OutputPin PINB0\n//includ the header\n#include \"WS2812.h\"\n\nint main(void)\n{\n\tDDRB = 0b00000001; //Set PINB0 as output\n\tStrip strip = Strip(12); //Set the number of pixels\n\tstrip.InitialiseStrip(); //Turn all leds off\n\t\n\tstrip.SetPixelColor(0, 255,0,0); //Set the color of led one to red\n\tstrip.SetPixelColor(1, 0,255,0); //Set the color of led two to green\n\tstrip.SetPixelColor(2, 0,0,255); //Set the color of led three to blue\n\tstrip.ShowPixel(); //Send the colors to the strip\n}\n```\n#### After uploading to your AVR the first three leds should light up in red, green and blue.\n\n\n## Functions: \n```cpp\nLedIsOff(5) //returns whether led number 5 is on or off\nShowPixel() //Shows all previously set led's\nSetPixelColor(2, 65280) //Set the color using a 32bit integer value\nSetPixelColor(4, 255, 0, 0) //Set the color of the pixel 4 to red\nSetPixelColor(3, 7, 0, 0, 255) //Set the color from pixel 3 to pixel 10 to blue.\nSetPixelColor(1, 5, 16711680) // //Set the color from pixel 1 to pixel 6 red.\nSetPixelColor(0, strip.ColorHSV(0, 255,255)); //Set the color using the HSV color wheel parameter:(1 = Color[0-360]; 2 = value of gray[0-255]; 3 = Brightness[0-255])\nLedsOff() //Turn all leds off\nSetMaxBrightness(150) //Sets the maximum Brightness of the strip to 150. From 0-255\nInitialiseStrip() //Initialise the strip =\u003e Set all leds to off\nGetLedCount() //Returns the number of leds you set on start | numberOfPixels does the same\nMap(value, value_min, value_max, out_min, out_max) //Map a value from min max to min max\nGetPixelColor(index) //returns a 32bit integer with the color\nGetPixelRed(index) //returns an 8bit integer representing the brightness of red\nGetPixelGreen(index) //returns an 8bit integer representing the brightness of green\nGetPixelBlue(index) //returns an 8bit integer representing the brightness of blue\n``` \n## This is how it could look like\n\u003cimg src=\"images/rgb.jpg\" width=\"80%\" height=\"auto\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozenassassine%2Fws2812-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrozenassassine%2Fws2812-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozenassassine%2Fws2812-controller/lists"}