Skip to content

Commit

Permalink
use WS2812B instead of NEOPIXEL in examples #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Legion2 committed May 20, 2020
1 parent 0eef10b commit 383bd75
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions examples/AdditionalFeatures/AdditionalFeatures.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ void setup() {
CLP::reset(&firmware);
ledController.reset();
}
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 60);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
ledController.addLEDs(0, ledsChannel1, 60);
ledController.addLEDs(1, ledsChannel2, 60);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/AmbientBacklight/AmbientBacklight.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 84);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 105);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 84);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 105);
ledController.addLEDs(0, ledsChannel1, 84);
ledController.addLEDs(1, ledsChannel2, 105);
ledController.onUpdateHook(0, []() {
Expand Down
4 changes: 2 additions & 2 deletions examples/CommanderPRO/CommanderPRO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ PWMFan fan4(PWM_FAN_PIN_4, 0, 2000);

void setup() {
CLP::disableBuildInLEDs();
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
temperatureController.addSensor(0, TEMP_SENSOR_PIN_1);
Expand Down
4 changes: 2 additions & 2 deletions examples/DebugSketch/DebugSketch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ bool printUpdate = PRINT_UPDATE;
void setup() {
Serial.begin(115200);
Serial.setTimeout(100);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void setup() {
Serial is used by CorsairLightingProtocolSerial!
*/
cLPS.setup();
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, CHANNEL_LED_COUNT);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, CHANNEL_LED_COUNT);
ledController.addLEDs(0, ledsChannel1, CHANNEL_LED_COUNT);
ledController.addLEDs(1, ledsChannel2, CHANNEL_LED_COUNT);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/LS100/LS100.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 135);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 54);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 135);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 54);
ledController.addLEDs(0, ledsChannel1, 135);
ledController.addLEDs(1, ledsChannel2, 54);
pinMode(BUTTON_PIN, INPUT_PULLUP);
Expand Down
2 changes: 1 addition & 1 deletion examples/LightingNodeCORE/LightingNodeCORE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 204);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 204);
ledController.addLEDs(0, ledsChannel1, 204);
}

Expand Down
4 changes: 2 additions & 2 deletions examples/LightingNodePRO/LightingNodePRO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 96);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 96);
ledController.addLEDs(0, ledsChannel1, 96);
ledController.addLEDs(1, ledsChannel2, 96);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/RepeatAndScale/RepeatAndScale.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 100);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 144);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 100);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 144);
ledController.addLEDs(0, ledsChannel1, 50);
ledController.addLEDs(1, ledsChannel2, 60);
ledController.onUpdateHook(0, []() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void setup() {
Serial.begin(115200);
#endif
CLP::disableBuildInLEDs();
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
ledController.addLEDs(0, leds, CHANNEL_LED_COUNT);
ledController.addLEDs(1, &(leds[CHANNEL_LED_COUNT]), CHANNEL_LED_COUNT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_1>(ledsChannel1, 96);
FastLED.addLeds<NEOPIXEL, DATA_PIN_CHANNEL_2>(ledsChannel2, 60);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 96);
FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 60);
ledController.addLEDs(0, ledsChannel1, 96);
ledController.addLEDs(1, ledsChannel2, 60);
ledController.onUpdateHook(0, []() {
Expand Down

0 comments on commit 383bd75

Please sign in to comment.