Skip to content

Commit ed18054

Browse files
authored
Merge pull request #133 from Legion2/generic-chiptype
use WS2812B instead of NEOPIXEL in examples
2 parents 0eef10b + 0a7eca8 commit ed18054

File tree

13 files changed

+25
-23
lines changed

13 files changed

+25
-23
lines changed

.github/workflows/documentation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- name: Install doxygen
1616
run: sudo apt install doxygen graphviz
17+
- name: Fix Readme title
18+
run: sed -i '1s/ \[/\n\[/' README.md
1719
- name: Run doxygen
1820
run: doxygen extra/doxygen.conf
1921
- name: Deploy to gh-pages

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
arduino-board-fqbn: ${{ matrix.board }}
2121
platform-url: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
2222
arduino-platform: arduino:[email protected],SparkFun:[email protected],Legion2:[email protected]
23-
required-libraries: FastLED@3.2.0
23+
required-libraries: FastLED@3.3.3
2424
sketch-names: LightingNodePRO.ino,
2525
SingleStripLightingNodePRO.ino,
2626
CommanderPRO.ino,
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
arduino-board-fqbn: ${{ matrix.board }}
4848
arduino-platform: arduino:[email protected]
49-
required-libraries: FastLED@3.2.0
49+
required-libraries: FastLED@3.3.3
5050
sketch-names: HoodLoader2UnoMegaController.ino
5151
test16u2:
5252
name: Test 16u2 sketch for ${{ matrix.board }}
@@ -62,5 +62,5 @@ jobs:
6262
arduino-board-fqbn: ${{ matrix.board }}
6363
platform-url: https://raw.githubusercontent.com/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
6464
arduino-platform: arduino:[email protected],HoodLoader2:[email protected],Legion2:[email protected]
65-
required-libraries: FastLED@3.2.0
65+
required-libraries: FastLED@3.3.3
6666
sketch-names: HoodLoader2CLPBridge.ino

examples/AdditionalFeatures/AdditionalFeatures.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ void setup() {
3535
CLP::reset(&firmware);
3636
ledController.reset();
3737
}
38-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 60);
39-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
38+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 60);
39+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
4040
ledController.addLEDs(0, ledsChannel1, 60);
4141
ledController.addLEDs(1, ledsChannel2, 60);
4242
}

examples/AmbientBacklight/AmbientBacklight.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2929
CorsairLightingProtocolHID cHID(&cLP);
3030

3131
void setup() {
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 84);
33-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 105);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 84);
33+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 105);
3434
ledController.addLEDs(0, ledsChannel1, 84);
3535
ledController.addLEDs(1, ledsChannel2, 105);
3636
ledController.onUpdateHook(0, []() {

examples/CommanderPRO/CommanderPRO.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ PWMFan fan4(PWM_FAN_PIN_4, 0, 2000);
5151

5252
void setup() {
5353
CLP::disableBuildInLEDs();
54-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
55-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
54+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
55+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
5656
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
5757
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
5858
temperatureController.addSensor(0, TEMP_SENSOR_PIN_1);

examples/DebugSketch/DebugSketch.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ bool printUpdate = PRINT_UPDATE;
3535
void setup() {
3636
Serial.begin(115200);
3737
Serial.setTimeout(100);
38-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
39-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
38+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
39+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
4040
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
4141
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
4242
}

examples/HoodLoader2UnoMegaController/HoodLoader2UnoMegaController.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ void setup() {
3737
Serial is used by CorsairLightingProtocolSerial!
3838
*/
3939
cLPS.setup();
40-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
41-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
40+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
41+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
4242
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
4343
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
4444
}

examples/LS100/LS100.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
3232
CorsairLightingProtocolHID cHID(&cLP);
3333

3434
void setup() {
35-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 135);
36-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 54);
35+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 135);
36+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 54);
3737
ledController.addLEDs(0, ledsChannel1, 135);
3838
ledController.addLEDs(1, ledsChannel2, 54);
3939
pinMode(BUTTON_PIN, INPUT_PULLUP);

examples/LightingNodeCORE/LightingNodeCORE.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2626
CorsairLightingProtocolHID cHID(&cLP);
2727

2828
void setup() {
29-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 204);
29+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 204);
3030
ledController.addLEDs(0, ledsChannel1, 204);
3131
}
3232

examples/LightingNodePRO/LightingNodePRO.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2828
CorsairLightingProtocolHID cHID(&cLP);
2929

3030
void setup() {
31-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 96);
31+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 96);
3333
ledController.addLEDs(0, ledsChannel1, 96);
3434
ledController.addLEDs(1, ledsChannel2, 96);
3535
}

examples/RepeatAndScale/RepeatAndScale.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2828
CorsairLightingProtocolHID cHID(&cLP);
2929

3030
void setup() {
31-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 100);
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 144);
31+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 100);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 144);
3333
ledController.addLEDs(0, ledsChannel1, 50);
3434
ledController.addLEDs(1, ledsChannel2, 60);
3535
ledController.onUpdateHook(0, []() {

examples/SingleStripLightingNodePRO/SingleStripLightingNodePRO.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void setup() {
4040
Serial.begin(115200);
4141
#endif
4242
CLP::disableBuildInLEDs();
43-
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
43+
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
4444
ledController.addLEDs(0, leds, CHANNEL_LED_COUNT);
4545
ledController.addLEDs(1, &(leds[CHANNEL_LED_COUNT]), CHANNEL_LED_COUNT);
4646
}

examples/TransformLLFansFormatToStrip/TransformLLFansFormatToStrip.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
2828
CorsairLightingProtocolHID cHID(&cLP);
2929

3030
void setup() {
31-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
32-
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
31+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
32+
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
3333
ledController.addLEDs(0, ledsChannel1, 96);
3434
ledController.addLEDs(1, ledsChannel2, 60);
3535
ledController.onUpdateHook(0, []() {

0 commit comments

Comments
 (0)