Skip to content

How to use on Arduino Uno and Arduino Mega

Leon Kiefer edited this page Jan 14, 2020 · 8 revisions

Arduino Uno and Arduino Mega are based on an ATmega328 and ATmega16U2, yes two microcontroller on one board. The ATmega328 does not handle the USB communication on the Arduino boards, the ATmega16U2 handle the communication. The sketch you upload, is uploaded to the ATmega328, so you can't change what the ATmega16U2 is doing. But that is important for the Corsair Lighting Protocol library. The library needs control over the USB communication in such a way that:

  1. VID and PID can be changed
  2. new USB Endpoint can be defined
  3. HID Reports can be send and received

Nothing of that can be done with the normal Arduino Uno and Mega, because you can not program the ATmega16U2.

To get Corsair Lighting Protocol working on an Arduino Uno or Mega HoodLoader2 must be used. HoodLoader2 is a bootloader to reprogram the ATmega16U2.

If anything goes wrong while burning the HoodLoader2 bootloader you can 'brick' your Arduino. It's up to you to decide what to do with your Arduino.

Setup HoodLoader2 on Arduino

  1. Burn the HoodLoader2 bootloader on your Arduino. You can find the instructions in the HoodLoader2 Wiki.
  2. Verify that HoodLoader2 bootloader was correctly installed. See Verify-installation.
  3. read how to use reset with HoodLoader2
  4. read how to upload sketches using HoodLoader2

Install libraries and boards

  1. Use the Arduino IDE Library-Manager to install the libraries. Open the Library-Manager in Arduino IDE via Tools->Manage Libraries...

  2. Search for "Corsair Lighting Protocol" and install the Corsair Lighting Protocol library.

  3. Search for "FastLED" in the Library-Manager and install the FastLED library.

  4. Install the CLP Boards. They can be installed by following the CLP Boards installation guide.

  5. Install the HoodLoader2 Boards. They can be installed by following the Software Installation guide.

  6. Verify the boards are installed correctly. HoodLoader2 Boards and Corsair Lighting Protocol Boards must both be installed as shown in the screenshot.

    verify boards installation

Upload the Sketches

  1. exit iCUE and make sure it's not running in the background
  2. open File menu->Examples->Corsair Lighting Protocol->HoodLoader2UnoMegaController in Arduino IDE
  3. select Tools->Board->HoodLoader2 Uno/Mega 2560
  4. select the COM port of your Arduino
  5. hit upload to upload the HoodLoader2UnoMegaController to the IO MCU
  6. open File menu->Examples->Corsair Lighting Protocol->HoodLoader2CLPBridge
  7. select Tools->Board->CLP HoodLoader2 16u2
  8. select Tools->Device->Lighting Node PRO
  9. select the COM port of your arduino, this could have changed since you uploaded the other sketch
  10. hit upload to upload HoodLoader2CLPBridge to the 16u2
  11. open iCUE

Troubleshooting

Upload problem?

Short the reset pin twice to enter bootloader mode manually as described here. Then retry uploading with the new COM port. After the upload you may have to exit the bootloader mode by short the reset pin once.

Why does the COM port changes?

If you upload to the 16u2 the USB IDs of the arduino changes and the board will get a new COM port. The COM port will be the same for the same USB IDs. The USB IDs include VID, PID and Serial Number.