Skip to content

Commit 9734276

Browse files
authored
Merge pull request #67 from Legion2/ls100
added support for LS100
2 parents 0dc7332 + d654e08 commit 9734276

File tree

6 files changed

+59
-2
lines changed

6 files changed

+59
-2
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
sketch: [LightingNodePRO, SingleStripLightingNodePRO, CommanderPRO, DeviceIDTool, RepeatAndScale, TransformLLFansFormatToStrip]
9+
sketch: [LightingNodePRO, SingleStripLightingNodePRO, CommanderPRO, DeviceIDTool, RepeatAndScale, TransformLLFansFormatToStrip, LS100]
1010
board: ["arduino:avr:leonardo", "arduino:avr:micro", "SparkFun:avr:promicro:cpu=16MHzatmega32U4"]
1111
steps:
1212
- uses: actions/checkout@master

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Lighting Node PRO
1717
* Commander PRO
1818
* Lighting Node CORE
19-
* Smart Lighting Controller (LS100)
19+
* LS100 Smart Lighting Controller
2020

2121
![Overview](docs/Overview.png)
2222

examples/LS100/LS100.ino

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
Copyright 2019 Leon Kiefer
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
#include <CorsairLightingProtocol.h>
17+
#include <FastLED.h>
18+
19+
// Hint: The channels of the LS100 are swapped in iCUE, so the first channel in iCUE is here channel 2
20+
#define DATA_PIN_CHANNEL_1 2
21+
#define DATA_PIN_CHANNEL_2 3
22+
23+
CRGB ledsChannel1[135];
24+
CRGB ledsChannel2[135];
25+
26+
CorsairLightingFirmware firmware = corsairLS100Firmware();
27+
FastLEDController ledController(true);
28+
CorsairLightingProtocolController cLP(&ledController, &firmware);
29+
CorsairLightingProtocolHID cHID(&cLP);
30+
31+
void setup() {
32+
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 135);
33+
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 135);
34+
ledController.addLEDs(0, ledsChannel1, 135);
35+
ledController.addLEDs(1, ledsChannel2, 135);
36+
}
37+
38+
void loop() {
39+
cHID.update();
40+
41+
if (ledController.updateLEDs()) {
42+
FastLED.show();
43+
}
44+
}

examples/LS100/board.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# CorsairLightingProtocol build property overrides
2+
3+
build.vid=0x1b1c
4+
build.pid=0x0c1e
5+
build.usb_product="LS100 Smart Lighting Controller"
6+
build.usb_manufacturer="Corsair"

src/CorsairLightingFirmware.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ CorsairLightingFirmware corsairLightingNodePROFirmware()
7777
return CorsairLightingFirmware(corsairLightingNodePROFirmwareVersion);
7878
}
7979

80+
CorsairLightingFirmware corsairLS100Firmware()
81+
{
82+
return CorsairLightingFirmware(corsairLightingNodePROFirmwareVersion);
83+
}
84+
8085
CorsairLightingFirmware corsairCommanderPROFirmware()
8186
{
8287
return CorsairLightingFirmware(corsairCommanderPROFirmwareVersion);

src/CorsairLightingFirmware.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@ class CorsairLightingFirmware {
4242

4343
CorsairLightingFirmware corsairLightingNodePROFirmware();
4444

45+
CorsairLightingFirmware corsairLS100Firmware();
46+
4547
CorsairLightingFirmware corsairCommanderPROFirmware();

0 commit comments

Comments
 (0)