How to Sync Hardware in Icue

Corsair Lighting Protocol arduino-library-badge Test Status Average time to resolve an issue

iCUE RGBSync OpenRGB

This library tin can be used to integrate custom/unofficial RGB strips with iCUE. This is not an official Corsair projection.

Features

  • Add together support of Corsair DIY device protocol to Arduino.
  • Command LEDs with the Corsair iCUE software.
  • Back up common LED chipsets. (due east.g. WS2812B, WS2801)
  • Support FastLED.
  • Supported platforms: Arduino AVR, TinyUSB supported cores
  • Hardware Lighting mode.
  • Utilize multiple devices at the same time.
  • Repeat or scale LED channels to arbitrary size.

Supported Devices

  • Lighting Node PRO
  • Commander PRO
  • Lighting Node Core
  • LS100 Smart Lighting Controller
  • LT100 Smart Lighting Towers

Overview

Getting started

This project is an Arduino library called "Corsair Lighting Protocol". It tin be used to command Arduino boards with iCUE. This project provides example sketches for easy use with Arduino IDE.

  • Requirements
  • Install the libraries
  • Create a Lighting Node PRO with AVR
  • Create a Lighting Node PRO with TinyUSB
  • Use the Lighting Node PRO

Requirements

The library is compatible with all boards using the MCU ATmega32U4. This includes Arduino Leonardo, SparkFun Pro Micro, Arduino Micro, and Adafruit 32u4 AVR Boards. Information technology also supports the Arduino Uno and Arduino Mega, simply this requires the HoodLoader2 bootloader, see this wiki for more details.

In addition, whatsoever board compatible with Adafruit TinyUSB for Arduino is also supported without the use of custom board definitions. Exist certain to ascertain 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.

It is non compatible with ATmega328 (Arduino Nano), STM8S103F3, teensy, or ESP8266 run into list of architecture/platform for a detailed description why they are not supported.

In the rest of the documentation "Arduino" is used as a synonym for all supported boards regardless of the manufacturer.

When you have issues with a board not listed here, delight open an Issue.

Install the libraries

To use this library you must install information technology with the Library-Manager. Open the Library-Manager in Arduino IDE via Tools->Manage Libraries... Search for "Corsair Lighting Protocol" and install the Corsair Lighting Protocol library. This library likewise requires the FastLED library. Search for "FastLED" in the Library-Manager and install the FastLED library. If using TinyUSB, also install the latest "Adafruit TinyUSB Library" equally it supersedes some of the core versions.

Create a Lighting Node PRO with AVR

This guide volition teach you how to create a Lighting Node PRO with an Arduino Leonardo uniform lath. If you take an Arduino Uno or Mega, run into the other guide.

  1. Open up the case "LightingNodePRO", you tin find information technology in Arduino IDE in the File menu->Examples->Corsair Lighting Protocol->LightingNodePRO. If yous can't open up the LightingNodePRO example the Corsair Lighting Protocol library is not installed correctly.

    open example sketch

  2. Install the CLP Boards. They can be installed by following the CLP Boards installation guide. Later installation it should be possible to select the CLP Boards in the Arduino IDE equally shown in the screenshot beneath. If your are using a Sparkfun Pro Micro also install the SparkFun Boards definition.

    select CLP Board

  3. Upload the "LightingNodePRO" sketch to your Arduino.

    upload sketch

  4. Practise the wiring. For more information on how to wire the LEDs and how to fix the LEDs in the lawmaking see the links.

    the wiring

  5. Verify your device works as expected. Open the Windows settings->devices->Other devices. Somewhere in the listing of devices, there should be a device chosen "Lighting Node PRO".

  6. At present open iCUE there you should see the "Lighting Node PRO".

If you have whatever problem during setup y'all may notice the solution in the Troubleshooting section.

Create a Lighting Node PRO for a Raspberry Pi Pico with TinyUSB

This guide will teach yous how to create a Lighting Node PRO with a Raspberry Pi Pico.

Note: FastLED currently does non back up the RP2040 natively. Y'all must manually merge back up by modifying your library to include the 6 RP2040 platform files in the FastLED/src/platforms/arm/rp2040 folder and #elif defined(ARDUINO_ARCH_RP2040) / #include statements in led_sysdefs.h and platforms.h.

  1. Install the Raspberry Pi Pico Arduino cadre.

  2. Open the example "TinyUSB", you tin find information technology in Arduino IDE in the File menu->Examples->Corsair Lighting Protocol->TinyUSB. If you can't open the LightingNodePRO example the Corsair Lighting Protocol library is not installed correctly.

  3. Select the Raspberry Pi Pico equally shown in the screenshot beneath. Be sure to select the "Adafruit TinyUSB" USB Stack.

    select Raspberry Pi Pico

  4. Upload the "TinyUSB" sketch to your Pico.

  5. Do the wiring. For more information on how to wire the LEDs and how to gear up the LEDs in the code come across the links.

    A level shifter or buffer, like this one, is recommended in between the Pico and LEDs to interpret the three.3v logic level of the Pico IO to the 5v logic level of the LEDs. Your setup may non work reliably without one.

    the wiring

  6. Verify your device works as expected. Open up the Windows settings->devices->Other devices. Somewhere in the listing of devices, there should be a device called "Lighting Node PRO".

  7. At present open iCUE there you lot should see the "Lighting Node PRO".

Use the Lighting Node PRO

iCUE RGB Strip example

In iCUE open the "Lighting Setup" tab of the Lighting Node PRO(LNP) and set for both Lighting Channels the device to "RGB Lite Strip" and the amount to a tenth of the LEDs you take. iCUE groups the LEDs into groups of ten. So if you have 20 LEDs, set the amount to 2. Now you tin create lighting effects in the "Lighting Aqueduct #" tabs.

Documentation

  • API Documentation
  • How it works
  • Use of multiple devices
  • Repeat or scale LED channels
  • Increase the Brightness of the LEDs
  • Hardware Lighting mode

How it works

This library uses the USB HID interface of the ATmega32U4. After 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. In iCUE you can then select the device and set some lighting effects. iCUE sends these via the HID protocol to the Arduino. These commands are understood past the library and converted into lighting furnishings on the RGB strips connected to the Arduino. The FastLED library is used to control the LEDs.

Use of multiple devices

Each device has two unique IDs, that is, they should exist unique. You lot must give each device a unique ID. There are two IDs that must be inverse Serial Number and DeviceID.

The Serial Number can exist set in the constructor of CorsairLightingProtocolHID and CLPUSBSerialBridge as shown in the example.

              const              char              mySerialNumber[] PROGMEM =                              "202B6949A967"              ; CorsairLightingProtocolHID              cHID(&cLP, mySerialNumber);

The Serial Number MAY only consist of HEX characters (0-9 and A-F).

The DeviceID tin can be set with the setDeviceID function of CorsairLightingFirmware.

              void              setup() {     DeviceID deviceId = {              0x9A,              0xDA,              0xA7,              0x8E              };     firmware.setDeviceID(deviceId);     ... }

Alternative

The DeviceID can be changed with the DeviceIDTool. Upload the DeviceIDTool sketch and and then open the Serial monitor with baudrate 115200. The tool displays the current DeviceID, you can type in a new DeviceID that is saved on the Arduino. Subsequently that, y'all can upload another sketch.

Repeat or scale LED channels

Y'all tin can repeat or scale LED channel controlled by iCUE onto physical LED strips. This 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.

To echo or scale a LED channel you must utilise the CLP::echo or the CLP:calibration function in the update claw of the FastLEDController. Meet the RepeatAndScale example for the consummate lawmaking. Both functions take the FastLEDController pointer and the channel index every bit arguments. Additionally, the repeat function takes as an argument how ofttimes the LED aqueduct should be repeated. For instance, if you want to duplicate the channel you must laissez passer 2 every bit argument. The calibration office takes equally third argument the length of the physical LED strip to which it scales the channel using integer scaling. For instance yous have 144 physical LEDs on you strip and sixty on the LED channel. Then the tertiary argument of the scale function is 144.

For both functions it's of import, that the CRGB arrays have at least the length of the physical LED strip. This ways if your LED channel from iCUE has 50 LEDs and y'all apply the repeat office to command 100 physical LEDs you MUST declare the CRGB array at least with a length of 100.

Increase the Brightness of the LEDs

When using LS100 or LT100 iCUE simply uses 50% of the LEDs brightness fifty-fifty if yous ready the brightness to max in the iCUE Device Settings. But at that place are good news, we can increment the brightness with the Arduino so nosotros can utilize the full brightness of our LEDs. Add the CLP::fixIcueBrightness function to the onUpdateHook in the setup office as shown in the example. If in that location are multiple functions called in onUpdateHook, fixIcueBrightness should be the first. Merely use this role with LS100 and LT100 devices!

ledController.onUpdateHook(0, []() {              CLP::fixIcueBrightness(&ledController,              0); });

Contrary direction of LED Strip

If yous want to alter the direction of the LEDs of the Strip without physically change the strip, the CLP::reverse part can be used. The contrary office must be called exist for scaling.

ledController.onUpdateHook(0, []() {              CLP::reverse(&ledController,              0); });

Hardware Lighting mode

The Hardware Lighting mode can be configured in iCUE. It allows yous the set lighting effects that volition exist active when iCUE is non running. This is the case when the PC is off, in sleep mode, booting or the user is logged out. And so if y'all want to have lighting effects in all these situations, use the Hardware Lighting mode. If you don't want information technology, configure a static black color.

License

This project is licensed under the Apache 2.0 License.

DISCLAIMERS

This is a DO Information technology YOURSELF projection, use at your own risk!

Credits

  • HoodLoader2
  • Arduino HID Project
  • Protocol Data

Related projects

  • CorsairArduinoController
  • CorsairLightingProtocolBoards
  • OpenCorsairLighting

0 Response to "How to Sync Hardware in Icue"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel