Wait I show you the code/sketch I get and what I want.
The working sketch (with 2 channel only) [ 8 argb strips with 10 led each] (ws2812b) --->
// Arduino IDE Custom Sketch for spoofed Node Pros
#include <CorsairLightingProtocol.h>
#include <FastLED.h>
#define DATA_PIN2 2
#define DATA_PIN3 3
#define DATA_PIN4 4
#define DATA_PIN5 5
#define DATA_PIN6 6
#define DATA_PIN7 7
#define DATA_PIN8 8
#define DATA_PIN9 9
#define LEDS_PIN2 10
#define LEDS_PIN3 10
#define LEDS_PIN4 10
#define LEDS_PIN5 10
#define LEDS_PIN6 10
#define LEDS_PIN7 10
#define LEDS_PIN8 10
#define LEDS_PIN9 10
#define OFFSET_PIN2 0
#define OFFSET_PIN3 10
#define OFFSET_PIN4 20
#define OFFSET_PIN5 30
#define OFFSET_PIN6 0
#define OFFSET_PIN7 10
#define OFFSET_PIN8 20
#define OFFSET_PIN9 30
CRGB ledsChannel1[40];
CRGB ledsChannel2[40];
const char mySerialNumber[] PROGMEM = "E73A7850A808653F278F";
CorsairLightingFirmwareStorageEEPROM firmwareStorage;
CorsairLightingFirmware firmware(CORSAIR_LIGHTING_NODE_PRO, &firmwareStorage);
FastLEDControllerStorageEEPROM storage;
FastLEDController ledController(&storage);
CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP, mySerialNumber);
void setup()
{
DeviceID deviceId = { 0xE7, 0x3A, 0x78, 0x50 };
firmware.setDeviceID(deviceId);
CLP::disableBuildInLEDs();
FastLED.addLeds<WS2812B, DATA_PIN2, GRB>(ledsChannel1, OFFSET_PIN2, LEDS_PIN2);
FastLED.addLeds<WS2812B, DATA_PIN3, GRB>(ledsChannel1, OFFSET_PIN3, LEDS_PIN3);
FastLED.addLeds<WS2812B, DATA_PIN4, GRB>(ledsChannel1, OFFSET_PIN4, LEDS_PIN4);
FastLED.addLeds<WS2812B, DATA_PIN5, GRB>(ledsChannel1, OFFSET_PIN5, LEDS_PIN5);
FastLED.addLeds<WS2812B, DATA_PIN6, GRB>(ledsChannel2, OFFSET_PIN6, LEDS_PIN6);
FastLED.addLeds<WS2812B, DATA_PIN7, GRB>(ledsChannel2, OFFSET_PIN7, LEDS_PIN7);
FastLED.addLeds<WS2812B, DATA_PIN8, GRB>(ledsChannel2, OFFSET_PIN8, LEDS_PIN8);
FastLED.addLeds<WS2812B, DATA_PIN9, GRB>(ledsChannel2, OFFSET_PIN9, LEDS_PIN9);
ledController.addLEDs(0, ledsChannel1, 40);
ledController.addLEDs(1, ledsChannel2, 40);
}
void loop()
{
cHID.update();
if (ledController.updateLEDs())
{
FastLED.show();
}
}
But I want this (with 8 channel only) [ 8 argb strips with 20 led each] (ws2812b) --->
// Arduino IDE Custom Sketch for spoofed Node Pros
// Modified for 8 individual channels, with 20 LEDs per channel
#include <CorsairLightingProtocol.h>
#include <FastLED.h>
#define DATA_PIN2 2
#define DATA_PIN3 3
#define DATA_PIN4 4
#define DATA_PIN5 5
#define DATA_PIN6 6
#define DATA_PIN7 7
#define DATA_PIN8 8
#define DATA_PIN9 9
#define LEDS_PIN2 20
#define LEDS_PIN3 20
#define LEDS_PIN4 20
#define LEDS_PIN5 20
#define LEDS_PIN6 20
#define LEDS_PIN7 20
#define LEDS_PIN8 20
#define LEDS_PIN9 20
#define OFFSET_PIN2 0
#define OFFSET_PIN3 0
#define OFFSET_PIN4 0
#define OFFSET_PIN5 0
#define OFFSET_PIN6 0
#define OFFSET_PIN7 0
#define OFFSET_PIN8 0
#define OFFSET_PIN9 0
// Define 8 separate channels for 8 GPIO pins, each controlling 20 LEDs
CRGB ledsChannel1[20];
CRGB ledsChannel2[20];
CRGB ledsChannel3[20];
CRGB ledsChannel4[20];
CRGB ledsChannel5[20];
CRGB ledsChannel6[20];
CRGB ledsChannel7[20];
CRGB ledsChannel8[20];
const char mySerialNumber[] PROGMEM = "6E144CE063D5FCFD88CD";
CorsairLightingFirmwareStorageEEPROM firmwareStorage;
CorsairLightingFirmware firmware(CORSAIR_LIGHTING_NODE_PRO, &firmwareStorage);
FastLEDControllerStorageEEPROM storage;
FastLEDController ledController(&storage);
CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP, mySerialNumber);
void setup()
{
DeviceID deviceId = { 0x6E, 0x14, 0x4C, 0xE0 };
firmware.setDeviceID(deviceId);
CLP::disableBuildInLEDs();
// Assign each GPIO pin to its own channel, with 20 LEDs per channel
FastLED.addLeds<WS2812B, DATA_PIN2, GRB>(ledsChannel1, OFFSET_PIN2, LEDS_PIN2);
FastLED.addLeds<WS2812B, DATA_PIN3, GRB>(ledsChannel2, OFFSET_PIN3, LEDS_PIN3);
FastLED.addLeds<WS2812B, DATA_PIN4, GRB>(ledsChannel3, OFFSET_PIN4, LEDS_PIN4);
FastLED.addLeds<WS2812B, DATA_PIN5, GRB>(ledsChannel4, OFFSET_PIN5, LEDS_PIN5);
FastLED.addLeds<WS2812B, DATA_PIN6, GRB>(ledsChannel5, OFFSET_PIN6, LEDS_PIN6);
FastLED.addLeds<WS2812B, DATA_PIN7, GRB>(ledsChannel6, OFFSET_PIN7, LEDS_PIN7);
FastLED.addLeds<WS2812B, DATA_PIN8, GRB>(ledsChannel7, OFFSET_PIN8, LEDS_PIN8);
FastLED.addLeds<WS2812B, DATA_PIN9, GRB>(ledsChannel8, OFFSET_PIN9, LEDS_PIN9);
// Add each channel to the LED controller, specifying 20 LEDs per channel
ledController.addLEDs(0, ledsChannel1, 20);
ledController.addLEDs(1, ledsChannel2, 20);
ledController.addLEDs(2, ledsChannel3, 20);
ledController.addLEDs(3, ledsChannel4, 20);
ledController.addLEDs(4, ledsChannel5, 20);
ledController.addLEDs(5, ledsChannel6, 20);
ledController.addLEDs(6, ledsChannel7, 20);
ledController.addLEDs(7, ledsChannel8, 20);
}
void loop()
{
cHID.update();
if (ledController.updateLEDs())
{
FastLED.show();
}
}
But as you see I use the Corsair lighting protocol and the devices list In that list is all 2 channels