-
-
Notifications
You must be signed in to change notification settings - Fork 64
How to use on Arduino Uno and Arduino Mega
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:
- VID and PID can be changed
- new USB Endpoint can be defined
- 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.
- Burn the HoodLoader2 bootloader on your Arduino. You can find the instructions in the HoodLoader2 Wiki.
- Verify that HoodLoader2 bootloader was correctly installed. See Verify-installation.
- read how to use reset with HoodLoader2
- read how to upload sketches using HoodLoader2
-
Use the Arduino IDE Library-Manager to install the libraries. Open the Library-Manager in Arduino IDE via Tools->Manage Libraries...
-
Search for "Corsair Lighting Protocol" and install the Corsair Lighting Protocol library.
-
Search for "FastLED" in the Library-Manager and install the FastLED library.
-
Install the CLP Boards. They can be installed by following the CLP Boards installation guide.
-
Install the HoodLoader2 Boards. They can be installed by following the Software Installation guide.
-
Verify the boards are installed correctly.
HoodLoader2 Boards
andCorsair Lighting Protocol Boards
must both be installed as shown in the screenshot.
- exit iCUE and make sure it's not running in the background
- open File menu->Examples->Corsair Lighting Protocol->HoodLoader2UnoMegaController in Arduino IDE
- select Tools->Board->HoodLoader2 Uno/Mega 2560
- select the COM port of your Arduino
- hit upload to upload the
HoodLoader2UnoMegaController
to the IO MCU - open File menu->Examples->Corsair Lighting Protocol->HoodLoader2CLPBridge
- select Tools->Board->CLP HoodLoader2 16u2
- select Tools->Device->Lighting Node PRO
- select the COM port of your arduino, this could have changed since you uploaded the other sketch
- hit upload to upload
HoodLoader2CLPBridge
to the 16u2 - open iCUE
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.
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.