Is it possible to get more channels?

Hello I am new and noob in this Arduino world, so sorry if I say something wierd and meaningless.
I have make a RGB controller for my pc RGB fans by using Arduino pro micro by follow the youtube tutorial. It's work fine I use fastled and Corsair lighting protocol and select device multiple fan.

But I find that whatever device I select I only get 2 channels. I want more channels.

Is there any way to get more channels by using Corsair lighting protocol.

I can edit the sketch as per my requirement if needed, but I don't know what device I select to to get individual channel for individual gpio pins.

Is this possible to get multiple channels for multiple ports/pins in Arduino pro micro.
Or 2 Channel is max I get if I select this protocol.

Can anyone please help.

I don't know what "channel" means (in this context).

With WS2812 LEDs ("NeoPixels") you can individually address a few-hundred LEDs, depending on how much memory you have.

Channels means I want to say that group of leds strips act same because they recieve same data from pc.
Like for example I attached 4 RGB led strips (ws2812b) each strip has 10 led, to each port of Arduino micro . So means in gpio0 connect to strip1, gpio1 to strip 2, gpio2 to strip 3, gpio3 to strip 4. All in single channel

So the lighting is set on a single strip (example led 1 to 4 - red, led 5 to 8 - green, 9 to 10 - blue)
So the other 3 led strip is also gonna copy the lighting of 1st strip because all 4 led strip is in single channel.

I know there is a way to set different lighting to to 4 led strips individually, but that partially happen because that time the RGB lighting software is take the all 4 strip as one, maybe it shows 4 strip in screen but still it bunch then in one and give me option to design lighting in all 4 strip as single device (like in icue)

But if I get different channels for each 4 strip then I get full design control because the RGB lighting software (eg icue) will take them in different devices, then the led strip doesn't copy each other.

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

Your first code in post #5 runs out of memory. Below is what I see when I compile the code for a Leonardo (which uses the same mictrocontroller as the Pro Micro.

Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Sketch uses 28704 bytes (100%) of program storage space. Maximum is 28672 bytes.
Global variables use 1524 bytes (59%) of dynamic memory, leaving 1036 bytes for local variables. Maximum is 2560 bytes.
text section exceeds available space in board

Compilation error: text section exceeds available space in board

I'm not familiar with the details of the FastLED library. A constructor like FastLED.addLeds<WS2812B, DATA_PIN2, GRB>(ledsChannel1, OFFSET_PIN2, LEDS_PIN2); looks odd (3 parameters between the ()) to me (but it is not necessarily wrong as it compiles).

I do not know whether what you want to achieve is possible or not but I have some doubts that it will be possible on a 32U4 based board like your Pro Micro. Each strip (and as far as I understand it that is one channel) takes 3*N bytes. The Corsair library also consumes memory.

I've taken the LightningNodePro example and added two channels; it compiles but I think that it's add the edge of what is possible. Halving the number of LEDs in each channel is playing it safe.

If I understand it correctly, below should give you 4 channels

/*
   Copyright 2019 Leon Kiefer

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

	   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
#include <CorsairLightingProtocol.h>
#include <FastLED.h>

#define DATA_PIN_CHANNEL_1 2
#define DATA_PIN_CHANNEL_2 3

#define DATA_PIN_CHANNEL_3 4
#define DATA_PIN_CHANNEL_4 5

CRGB ledsChannel1[48];
CRGB ledsChannel2[48];
CRGB ledsChannel3[48];
CRGB ledsChannel4[48];

CorsairLightingFirmwareStorageEEPROM firmwareStorage;
CorsairLightingFirmware firmware(CORSAIR_LIGHTING_NODE_PRO, &firmwareStorage);
FastLEDControllerStorageEEPROM storage;
FastLEDController ledController(&storage);
CorsairLightingProtocolController cLP(&ledController, &firmware);
CorsairLightingProtocolHID cHID(&cLP);

void setup() {
	FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_1, GRB>(ledsChannel1, 48);
	FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_2, GRB>(ledsChannel2, 48);
	FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_3, GRB>(ledsChannel3, 48);
	FastLED.addLeds<WS2812B, DATA_PIN_CHANNEL_4, GRB>(ledsChannel4, 48);
	ledController.addLEDs(0, ledsChannel1, 48);
	ledController.addLEDs(1, ledsChannel2, 48);
	ledController.addLEDs(2, ledsChannel3, 48);
	ledController.addLEDs(3, ledsChannel4, 48);
}

void loop() {
	cHID.update();

	if (ledController.updateLEDs()) {
		FastLED.show();
	}
}

You can give it a try (after adjusting the sizes of the arrays to match your needs).

1 Like

if I understand correctly: you want to reduce the number of ports used, since they send the same information (for example, 8 lights, they all work the same, but the 20mA on the port of a regular Arduino does not allow you to connect all this to one port)?

Unlikely; OP is using WS2812B addressable LED strips so the strips don't really consume power from a pin; it's 1 micro Ampere according to the datasheet.

Thanks for help @sterretje I will try your suggestion even 4 channel also work for me.

And thanks to point out about memory problem of first code.

The first code I write in post #5 is generated from this link https://srgbmods.net/sketchgen/ so I think it's work because afterall it's made by experts. But I didn't know it's goes out of memory.

And the second code with 8 channel I made with the help of AI, well it's also took lots of memory.

Thanks again for your help.

No no @kirilllanskoy I use different port for each led strips. And I give them power from seperate power supply. So there is no power issue.
Thanks for reply

Yes I use seperate power line to power the leds so micro controller don give the power to leds.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.