You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Create a Lighting Node PRO](#create-a-lighting-node-pro)
23
-
-[Use the library](#use-the-library)
28
+
-[Use the Lighting Node PRO](#use-the-lighting-node-pro)
24
29
25
30
## Requirements
26
31
The library is compatible with all boards using the MCU ATmega32U4.
@@ -29,44 +34,44 @@ It also supports the Arduino Uno and Arduino Mega, **but** this requires the [Ho
29
34
It is **not** compatible with Arduino Nano.
30
35
In the rest of the documentation "Arduino" is used as a synonym for all supported boards regardless of the manufacturer.
31
36
32
-
As an IDE [Visual Studio](https://visualstudio.microsoft.com/downloads/) with the extension [Visual Micro](https://marketplace.visualstudio.com/items?itemName=VisualMicro.ArduinoIDEforVisualStudio) is recommended.
33
-
Visual Micro provides the required functionality for free, but sometimes ask you to buy the full version.
34
-
Using the Arduino IDE is difficult, but you can find a tutorial in the [wiki](https://github.com/Legion2/CorsairLightingProtocol/wiki/How-to-use-Arduino-IDE).
35
-
36
37
You have problems with a board not listed here, please open an [Issue](https://github.com/Legion2/CorsairLightingProtocol/issues).
37
38
38
39
## Install the library
39
-
Use the [Library-Manager](https://www.visualmicro.com/page/User-Guide.aspx?doc=Library-Manager.html#) to install this library or download a [release](https://github.com/Legion2/CorsairLightingProtocol/releases).
40
+
Use the [Library-Manager](https://www.ardu-badge.com/Corsair%20Lighting%20Protocol/ide) to install this library (Corsair Lighting Protocol).
40
41
Additionally, the [FastLED](http://fastled.io/) library must be installed.
41
42
42
43
## Create a Lighting Node PRO
43
-
Open the example "LightingNodePRO", you can find it in the Visual Micro Explorer or the [examples directory](examples).
44
-
The library [FastLED](http://fastled.io/) is used to control the LEDs. 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.
45
-
After you have done the wiring or at least know which pin is the data pin, you can set this pin in the example sketch and upload it to the Arduino.
46
-
In Visual Studio use the "Release" [configuration](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/debugger/how-to-set-debug-and-release-configurations.md#change-the-build-configuration).
44
+
This guide will teach you how to create a Lighting Node PRO with an Arduino Leonardo compatible board.
45
+
If 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).
46
+
47
+
1. Open the example "LightingNodePRO", you can find it in Arduino IDE in the File menu->Examples->Corsair Lighting Protocol->LightingNodePRO or in the [examples directory](examples) if you download this project.
48
+
49
+

50
+
1. Follow [these steps](https://github.com/Legion2/CorsairLightingProtocolBoards#how-to-use-these-boards-in-arduino) to install the CLP Boards and upload the sketch to your Arduino.
51
+
1. Do the wiring.
52
+
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.
53
+
54
+

55
+
1. Verify that your device works as expected.
56
+
Open the Windows settings->devices->Other devices.
57
+
Somewhere in the list of devices, there should be a device called "Lighting Node PRO".
58
+
1. Now open [iCUE](https://www.corsair.com/icue) there should be the "Lighting Node PRO".
47
59
48
-
To verify that the library works as expected, open the Windows settings -> devices -> connected devices. Somewhere in the list of devices, there should be a device called "Lighting Node PRO". (If not, please open an [Issue](https://github.com/Legion2/CorsairLightingProtocol/issues))
49
-
Open [iCUE](https://www.corsair.com/icue) there should also be the "Lighting Node PRO".
60
+
## Use the Lighting Node PRO
50
61
51
-

62
+

52
63
53
64
In 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.
54
65
iCUE groups the LEDs into groups of ten.
55
66
So if you have 20 LEDs, set the amount to 2.
56
67
Now you can create lighting effects in the "Lighting Channel #" tabs.
57
68
58
-
The example "SingleStripLightingNodePRO" only requires one LED strip connected to the Arduino.
59
-
Because the "SingleStripLightingNodePRO" concatenate the two channels, a total of 120 LEDs can be controlled on a single LED Strip.
60
-
61
-
## Use the library
62
-
If you want to use this library in your own sketch don't forget to use Visual Studio as IDE and include the [board.txt](examples/LightingNodePRO/board.txt) in the root directory of your sketch.
-[Repeat or scale LED channel](#repeat-or-scale-led-channel)
69
-
-[Debugging](#debugging)
70
75
71
76
## How it works
72
77
This library uses the USB HID interface of the Arduino Micro or Leonardo.
@@ -75,26 +80,41 @@ After uploading a sketch with the library and these IDs, iCUE recognizes the Ard
75
80
In iCUE you can then select the "Lighting Node PRO" and set some lighting effects.
76
81
iCUE sends these via the CorsairLightingProtocol to the Arduino.
77
82
These commands are understood by the library and converted into lighting effects on the RGB strips connected to the Arduino.
83
+
The [FastLED](http://fastled.io/) library is used to control the LEDs.
78
84
79
85
## Use multiple Devices
80
86
Each device has two unique IDs, that is, they should be unique.
81
87
You must give each device a unique ID.
82
-
There are two IDs that must be changed `SERIAL_NUMBER` and `DeviceID`.
83
-
84
-
The `SERIAL_NUMBER` can be changed in the board.txt file.
85
-
Uncomment the line with `SERIAL_NUMBER` and change some characters at the end, don't change the length and only use HEX characters(0-9 and A-F).
86
-
The `DeviceID` can be changed with the [tool](examples/DeviceIDTool/DeviceIDTool.ino)
88
+
There are two IDs that must be changed `Serial Number` and `DeviceID`.
89
+
90
+
The Serial Number can be set in the constructor of `CorsairLightingProtocolHID` and `CLPUSBSerialBridge` as shown in the [example](examples/AdditionalFeatures/AdditionalFeatures.ino).
The Serial Number MAY only consist of HEX characters (0-9 and A-F).
96
+
97
+
The DeviceID can be set with the `setDeviceID` function of `CorsairLightingFirmware`.
98
+
```C++
99
+
void setup() {
100
+
byte deviceId[4] = { 0x9A, 0xDA, 0xA7, 0x8E };
101
+
firmware.setDeviceID(deviceId);
102
+
...
103
+
}
104
+
```
105
+
106
+
### Alternative
107
+
The `DeviceID` can be changed with the [DeviceIDTool](examples/DeviceIDTool/DeviceIDTool.ino).
87
108
Upload the DeviceIDTool sketch and then open the Serial monitor with baudrate 115200.
88
109
The tool displays the current DeviceID, you can type in a new DeviceID that is saved on the Arduino.
89
110
After that, you can upload another sketch.
90
111
91
112
## Repeat or scale LED channel
92
113
You can repeat or scale LED channel controlled by iCUE onto physical LED strips.
93
-
This is very useful if you have very long LED strips that are longer than 60/96 LEDs.
114
+
This is very useful if you have very long LED strips that are longer than 60/96/135 LEDs.
94
115
This is the maximum number iCUE supports.
95
116
96
117
To repeat or scale a LED channel you must apply the `CLP::repeat` or the `CLP:scale` function in the update hook of the FastLEDController.
97
-
The functions must be included from `FastLEDControllerUtils.h`.
98
118
See the [RepeatAndScale](examples/RepeatAndScale/RepeatAndScale.ino) example for the complete code.
99
119
Both functions take the FastLEDController pointer and the channel index as arguments.
100
120
Additionally, the `repeat` function takes as an argument how often the LED channel should be repeated.
@@ -106,16 +126,6 @@ Then the third argument of the `scale` function is `144`.
106
126
For both functions it's **important**, that the CRGB arrays have at least the length of the physical LED strip.
107
127
This 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.
108
128
109
-
## Debugging
110
-
For debugging don't use the integrated debugger of Visual Studio, as it will most likely break the USB communication.
111
-
Use the `DEBUG` macro and the Serial Monitor.
112
-
With the `-DDEBUG` flag you can enable debugging in the whole project.
113
-
Add this flag in the board.txt file to the `build.extra_flags`.
114
-
115
-
For advanced debugging you can use the [DebugSketch](examples/DebugSketch/DebugSketch.ino).
116
-
In the board.txt file, the default values for the debugging options can be set.
117
-
After uploading the sketch open the serial monitor with baud rate 115200 and set the line ending to "Line Feed"/"Newline" (`\n`).
118
-
119
129
# DISCLAIMERS
120
130
This is a DO IT YOURSELF project, use at your own risk!
121
131
@@ -126,4 +136,5 @@ This is a DO IT YOURSELF project, use at your own risk!
0 commit comments