{"id":18701977,"url":"https://github.com/legion2/corsairlightingprotocol","last_synced_at":"2025-04-04T10:09:38.223Z","repository":{"id":37359380,"uuid":"165415325","full_name":"Legion2/CorsairLightingProtocol","owner":"Legion2","description":"Control LEDs connected to an Arduino with iCUE, create an unofficial Corsair iCUE compatible Arduino LED controller.","archived":false,"fork":false,"pushed_at":"2024-08-09T07:31:55.000Z","size":3464,"stargazers_count":527,"open_issues_count":10,"forks_count":65,"subscribers_count":31,"default_branch":"dev","last_synced_at":"2025-03-28T09:08:23.990Z","etag":null,"topics":["arduino","arduino-library","corsair","corsair-devices","corsair-rgb","fastled","icue","led-controller","lighting-effects"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Legion2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"Legion2","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"paypal.me/LeonKiefer"}},"created_at":"2019-01-12T17:23:52.000Z","updated_at":"2025-03-27T10:21:20.000Z","dependencies_parsed_at":"2023-02-05T11:16:21.883Z","dependency_job_id":"510a51d4-731b-47bc-9fcc-d55793e92502","html_url":"https://github.com/Legion2/CorsairLightingProtocol","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2FCorsairLightingProtocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2FCorsairLightingProtocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2FCorsairLightingProtocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Legion2%2FCorsairLightingProtocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Legion2","download_url":"https://codeload.github.com/Legion2/CorsairLightingProtocol/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"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":["arduino","arduino-library","corsair","corsair-devices","corsair-rgb","fastled","icue","led-controller","lighting-effects"],"created_at":"2024-11-07T11:43:09.106Z","updated_at":"2025-04-04T10:09:38.190Z","avatar_url":"https://github.com/Legion2.png","language":"C++","readme":"# Corsair Lighting Protocol [![arduino-library-badge](https://www.ardu-badge.com/badge/Corsair%20Lighting%20Protocol.svg?)](https://www.ardu-badge.com/Corsair%20Lighting%20Protocol) [![Test Status](https://github.com/Legion2/CorsairLightingProtocol/workflows/Test/badge.svg)](https://github.com/Legion2/CorsairLightingProtocol/actions?query=workflow%3ATest+branch%3Adev+event%3Apush) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/Legion2/CorsairLightingProtocol.svg)](https://isitmaintained.com/project/Legion2/CorsairLightingProtocol \"Average time to resolve an issue\")\n\n\u003ca href=\"https://www.corsair.com/icue\"\u003e\u003cimg src=\"extra/images/iCUEDarkBadge.png\" alt=\"iCUE\" height=\"80\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://rgbsync.com/\"\u003e\u003cimg src=\"extra/images/RGBSyncDarkBadge.png\" alt=\"RGBSync\" height=\"80\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://gitlab.com/CalcProgrammer1/OpenRGB\"\u003e\u003cimg src=\"extra/images/OpenRGBBadge.png\" alt=\"OpenRGB\" height=\"80\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://signalrgb.com\"\u003e\u003cimg src=\"extra/images/SignalRGBBadge.png\" alt=\"SignalRGB\" height=\"80\" /\u003e\u003c/a\u003e\n\n\n**This library can be used to integrate custom/unofficial RGB strips with iCUE.**\n_This is not an official Corsair project._\n\n## Features\n* Add support of Corsair DIY device protocol to Arduino.\n* Control LEDs with the [Corsair iCUE software](https://www.corsair.com/icue).\n* [Support common LED chipsets](https://github.com/FastLED/FastLED/wiki/Overview#chipsets). (e.g. WS2812B, WS2801)\n* Support [FastLED](http://fastled.io/).\n* Supported platforms: Arduino AVR, [TinyUSB supported cores](https://github.com/adafruit/Adafruit_TinyUSB_Arduino#supported-cores)\n* Hardware Lighting mode.\n* Use multiple devices at the same time.\n* Repeat or scale LED channels to arbitrary size.\n\n### Supported Devices\n* Lighting Node PRO\n* Commander PRO\n* Lighting Node CORE\n* LS100 Smart Lighting Controller\n* LT100 Smart Lighting Towers\n\n![Overview](extra/images/overview.png)\n\n# Getting started\nThis project is an Arduino library called \"Corsair Lighting Protocol\".\nIt can be used to control Arduino boards with iCUE.\nThis project provides example sketches for easy use with Arduino IDE.\n\n- [Requirements](#requirements)\n- [Install the libraries](#install-the-libraries)\n- [Create a Lighting Node PRO with AVR](#create-a-lighting-node-pro-with-avr)\n- [Create a Lighting Node PRO with TinyUSB](#create-a-lighting-node-pro-for-a-raspberry-pi-pico-with-tinyusb)\n- [Use the Lighting Node PRO](#use-the-lighting-node-pro)\n\n## Requirements\nThe library is compatible with all boards using the MCU ATmega32U4.\nThis includes **Arduino Leonardo**, **SparkFun Pro Micro**, **Arduino Micro**, and **Adafruit 32u4 AVR Boards**.\nIt also supports the Arduino Uno and Arduino Mega, **but** this requires the [HoodLoader2](https://github.com/NicoHood/HoodLoader2) bootloader, see [this wiki](https://github.com/Legion2/CorsairLightingProtocol/wiki/How-to-use-on-Arduino-Uno-and-Arduino-Mega) for more details.\n\nIn addition, any board compatible with **Adafruit TinyUSB for Arduino** is also supported without the use of custom board definitions. Be sure to define USE_TINYUSB, which is done automatically when using a supported core and selecting TinyUSB for the USB Stack. See the TinyUSB example for implementation details.\n\nIt is **not** compatible with ATmega328 (Arduino Nano), STM8S103F3, teensy, or ESP8266 see [list of architecture/platform](https://github.com/Legion2/CorsairLightingProtocol/issues?q=is%3Aissue+label%3Aarchitecture%2Fplatform) for a detailed description why they are not supported.\n\nIn the rest of the documentation \"Arduino\" is used as a synonym for all supported boards regardless of the manufacturer.\n\nWhen you have problems with a board not listed here, please open an [Issue](https://github.com/Legion2/CorsairLightingProtocol/issues).\n\n## Install the libraries\nTo use this library you must install it with the Library-Manager.\nOpen the Library-Manager in Arduino IDE via Tools-\u003eManage Libraries...\nSearch for \"Corsair Lighting Protocol\" and install the Corsair Lighting Protocol library.\nThis library also requires the [FastLED](http://fastled.io/) library.\nSearch for \"FastLED\" in the Library-Manager and install the FastLED library.\nIf using TinyUSB, also install the latest \"Adafruit TinyUSB Library\" as it supersedes some of the core versions.\n\n## Create a Lighting Node PRO with AVR\nThis guide will teach you how to create a Lighting Node PRO with an Arduino Leonardo compatible board.\nIf you have an Arduino Uno or Mega, see the [other guide](https://github.com/Legion2/CorsairLightingProtocol/wiki/How-to-use-on-Arduino-Uno-and-Arduino-Mega).\n\n1. Open the example \"LightingNodePRO\", you can find it in Arduino IDE in the File menu-\u003eExamples-\u003eCorsair Lighting Protocol-\u003eLightingNodePRO.\n   If you can't open the LightingNodePRO example the Corsair Lighting Protocol library is not installed correctly.\n\n   ![open example sketch](extra/images/open-example.png)\n1. Install the [CLP Boards](https://github.com/Legion2/CorsairLightingProtocolBoards).\n   They can be installed by following the [CLP Boards installation guide](https://github.com/Legion2/CorsairLightingProtocolBoards#how-to-use-these-boards-in-arduino).\n   After installation it should be possible to select the CLP Boards in the Arduino IDE as shown in the screenshot below.\n   If your are using a Sparkfun Pro Micro also install the [SparkFun Boards definition](https://github.com/sparkfun/Arduino_Boards#installation-instructions).\n\n   ![select CLP Board](extra/images/select-board.png)\n1. Upload the \"LightingNodePRO\" sketch to your Arduino.\n\n   ![upload sketch](extra/images/upload-sketch.png)\n1. Do the wiring.\n   For more information on [how to wire the LEDs](https://github.com/FastLED/FastLED/wiki/Wiring-leds) and [how to set up the LEDs in the code](https://github.com/FastLED/FastLED/wiki/Basic-usage#setting-up-the-leds) see the links.\n   \n   ![the wiring](extra/images/board-wiring.jpg)\n1. Verify your device works as expected.\n   Open the Windows settings-\u003edevices-\u003eOther devices.\n   Somewhere in the list of devices, there should be a device called \"Lighting Node PRO\".\n1. Now open [iCUE](https://www.corsair.com/icue) there you should see the \"Lighting Node PRO\".\n\n\u003e If you have any problem during setup you may find the solution in the [Troubleshooting section](https://github.com/Legion2/CorsairLightingProtocol/wiki/Troubleshooting).\n\n## Create a Lighting Node PRO for a Raspberry Pi Pico with TinyUSB\n\nThis guide will teach you how to create a Lighting Node PRO with a Raspberry Pi Pico.\n\n**Note:** FastLED currently does not support the RP2040 natively. You must manually merge support by modifying your library to include the [6 RP2040 platform files](https://github.com/FastLED/FastLED/pull/1261/files#diff-fda1710ad90fcc4b2f07be21a834da7d24b00008867655232c84fb0369cfc74b) in the FastLED/src/platforms/arm/rp2040 folder and `#elif defined(ARDUINO_ARCH_RP2040)` / `#include` statements in [led_sysdefs.h](https://github.com/FastLED/FastLED/pull/1261/files#diff-95f6b43a0e6b0e58988e1be3bc6415ded5284082a4f2ce2aaa90f5931d4194af) and [platforms.h](https://github.com/FastLED/FastLED/pull/1261/files#diff-255ea38a6573ed237ea1fe164d5e87ca46811eef21ba6e2cef120fda47c6e62f).\n\n1. Install the [Raspberry Pi Pico Arduino core](https://github.com/earlephilhower/arduino-pico#installing-via-arduino-boards-manager).\n\n1. Open the example \"TinyUSB\", you can find it in Arduino IDE in the File menu-\u003eExamples-\u003eCorsair Lighting Protocol-\u003eTinyUSB.\n   If you can't open the LightingNodePRO example the Corsair Lighting Protocol library is not installed correctly.\n\n1. Select the Raspberry Pi Pico as shown in the screenshot below. Be sure to select the \"Adafruit TinyUSB\" USB Stack.\n\n   ![select Raspberry Pi Pico](extra/images/select-board-pico.png)\n1. Upload the \"TinyUSB\" sketch to your Pico.\n\n1. Do the wiring.\n   For more information on [how to wire the LEDs](https://github.com/FastLED/FastLED/wiki/Wiring-leds) and [how to set up the LEDs in the code](https://github.com/FastLED/FastLED/wiki/Basic-usage#setting-up-the-leds) see the links.\n\n   A level shifter or buffer, like [this one](https://www.ti.com/product/SN74AHCT1G126), is recommended in between the Pico and LEDs to translate the 3.3v logic level of the Pico IO to the 5v logic level of the LEDs. Your setup may not work reliably without one.\n   \n   ![the wiring](extra/images/board-wiring-pico.jpg)\n1. Verify your device works as expected.\n   Open the Windows settings-\u003edevices-\u003eOther devices.\n   Somewhere in the list of devices, there should be a device called \"Lighting Node PRO\".\n1. Now open [iCUE](https://www.corsair.com/icue) there you should see the \"Lighting Node PRO\".\n\n## Use the Lighting Node PRO\n\n![iCUE RGB Strip example](extra/images/iCUE.jpg)\n\nIn iCUE open the \"Lighting Setup\" tab of the Lighting Node PRO(LNP) and set for both Lighting Channels the device to \"RGB Light Strip\" and the amount to a tenth of the LEDs you have.\niCUE groups the LEDs into groups of ten.\nSo if you have 20 LEDs, set the amount to 2.\nNow you can create lighting effects in the \"Lighting Channel #\" tabs.\n\n# Documentation\n\n- [API Documentation](https://legion2.github.io/CorsairLightingProtocol/)\n- [How it works](#how-it-works)\n- [Use of multiple devices](#use-of-multiple-devices)\n- [Repeat or scale LED channels](#repeat-or-scale-led-channels)\n- [Increase the Brightness of the LEDs](#increase-the-brightness-of-the-leds)\n- [Hardware Lighting mode](#hardware-lighting-mode)\n\n## How it works\nThis library uses the USB HID interface of the ATmega32U4.\nAfter uploading a sketch with the library and selected CLP Boards, iCUE recognizes the Arduino as a Corsair device, because the CLP Boards use USB IDs of Corsair.\nIn iCUE you can then select the device and set some lighting effects.\niCUE sends these via the HID protocol to the Arduino.\nThese commands are understood by the library and converted into lighting effects on the RGB strips connected to the Arduino.\nThe [FastLED](http://fastled.io/) library is used to control the LEDs.\n\n## Use of multiple devices\nEach device has two unique IDs, that is, they should be unique.\nYou must give each device a unique ID.\nThere are two IDs that must be changed `Serial Number` and `DeviceID`.\n\nThe Serial Number can be set in the constructor of `CorsairLightingProtocolHID` and `CLPUSBSerialBridge` as shown in the [example](examples/AdditionalFeatures/AdditionalFeatures.ino).\n```C++\nconst char mySerialNumber[] PROGMEM = \"202B6949A967\";\nCorsairLightingProtocolHID cHID(\u0026cLP, mySerialNumber);\n```\nThe Serial Number MAY only consist of HEX characters (0-9 and A-F).\n\nThe DeviceID can be set with the `setDeviceID` function of `CorsairLightingFirmware`.\n```C++\nvoid setup() {\n    DeviceID deviceId = { 0x9A, 0xDA, 0xA7, 0x8E };\n    firmware.setDeviceID(deviceId);\n    ...\n}\n```\n\n### Alternative\nThe `DeviceID` can be changed with the [DeviceIDTool](examples/DeviceIDTool/DeviceIDTool.ino).\nUpload the DeviceIDTool sketch and then open the Serial monitor with baudrate 115200.\nThe tool displays the current DeviceID, you can type in a new DeviceID that is saved on the Arduino.\nAfter that, you can upload another sketch.\n\n## Repeat or scale LED channels\nYou can repeat or scale LED channel controlled by iCUE onto physical LED strips.\nThis is very useful if you have very long LED strips that are longer than 60/96/135 LEDs, which is the maximum number iCUE supports.\n\nTo repeat or scale a LED channel you must apply the `CLP::repeat` or the `CLP:scale` function in the update hook of the FastLEDController.\nSee the [RepeatAndScale](examples/RepeatAndScale/RepeatAndScale.ino) example for the complete code.\nBoth functions take the FastLEDController pointer and the channel index as arguments.\nAdditionally, the `repeat` function takes as an argument how often the LED channel should be repeated.\nFor example, if you want to duplicate the channel you must pass `2` as argument.\nThe `scale` function takes as third argument the length of the physical LED strip to which it scales the channel using integer scaling.\nFor example you have 144 physical LEDs on you strip and 60 on the LED channel.\nThen the third argument of the `scale` function is `144`.\n\nFor both functions it's **important**, that the CRGB arrays have at least the length of the physical LED strip.\nThis means if your LED channel from iCUE has 50 LEDs and you use the `repeat` function to control 100 physical LEDs you MUST declare the CRGB array at least with a length of 100.\n\n## Increase the Brightness of the LEDs\nWhen using LS100 or LT100 iCUE only uses 50% of the LEDs brightness even if you set the brightness to max in the iCUE Device Settings.\nBut there are good news, we can increase the brightness with the Arduino so we can use the full brightness of our LEDs.\nAdd the `CLP::fixIcueBrightness` function to the `onUpdateHook` in the setup function as shown in the [example](examples/AmbientBacklight/AmbientBacklight.ino).\nIf there are multiple functions called in `onUpdateHook`, `fixIcueBrightness` should be the first.\nOnly use this function with LS100 and LT100 devices!\n```C++\nledController.onUpdateHook(0, []() {\n\tCLP::fixIcueBrightness(\u0026ledController, 0);\n});\n```\n\n## Reverse direction of LED Strip\nIf you want to change the direction of the LEDs of the Strip without physically change the strip, the `CLP::reverse` function can be used.\nThe reverse function must be called be for scaling.\n```C++\nledController.onUpdateHook(0, []() {\n\tCLP::reverse(\u0026ledController, 0);\n});\n```\n## Hardware Lighting mode\nThe [Hardware Lighting mode](https://forum.corsair.com/v3/showthread.php?t=182874) can be configured in iCUE.\nIt allows you the set lighting effects that will be active when iCUE **is not** running.\nThis is the case when the PC is off, in sleep mode, booting or the user is logged out.\nSo if you want to have lighting effects in all these situations, use the Hardware Lighting mode.\nIf you don't want it, configure a static black color.\n\n# License\nThis project is licensed under the Apache 2.0 License.\n\n# DISCLAIMERS\nThis is a DO IT YOURSELF project, use at your own risk!\n\n# Credits\n- [HoodLoader2](https://github.com/NicoHood/HoodLoader2)\n- [Arduino HID Project](https://github.com/NicoHood/HID)\n- [Protocol Information](https://github.com/audiohacked/OpenCorsairLink/issues/70)\n\n## Related projects\n- [CorsairArduinoController](https://github.com/TylerSeiford/CorsairArduinoController)\n- [CorsairLightingProtocolBoards](https://github.com/Legion2/CorsairLightingProtocolBoards)\n- [OpenCorsairLighting](https://github.com/McHauge/OpenCorsairLighting)\n","funding_links":["https://github.com/sponsors/Legion2","paypal.me/LeonKiefer"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegion2%2Fcorsairlightingprotocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flegion2%2Fcorsairlightingprotocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flegion2%2Fcorsairlightingprotocol/lists"}