Hi, I'd like to know how to make subtle changes in colour at low

Hi, I’d like to know how to make subtle changes in colour at low brightness with SK9822s.

I’m using a strip of 10 SK9822s hooked up to an Arduino Uno (an actual Arduino, not a clone) to check out these LEDs, which are new to me. Arduino IDE version 6.1.12. FastLED 3.1.3.

(btw, they were sold as APA102s, but they are certainly SK9822s, which I’m happy about in principal, because according to APA102 – Tim's Blog , the SK9822s offer true current control whereas the APA102s express the master brightness function through PWM. The order of red/green/blue seems to be B,G,R).

I’m confident that the LEDs are wired right, since I can broadly control their colour and brightness, provided the brightness is fairly high.

I wrote the code below to test how fine can I make adjustments to the amount of R, G & B in the mix. The white LED (6) blinks as expected gradually getting brighter, but the R, G & B LEDS (LEDs 0, 2 & 4) only start to blink after around 30 white blinks. Using 08 for the levels of R, G & B in the other LEDs is arbitrary - when I made this 01, the coloured LEDs each blinked once, just before the white LED went back to zero brightness. So I’m not getting access to all the lovely fine control that these LEDs offer.

If anyone has any insight they can share, I’d be very grateful :slight_smile:

My coding level is beginner.

I think there’s a better way to share code than copy/paste - if so, please let me know how.

#include <FastLED.h>
#define NUM_LEDS 10
#define DATA_PIN 6
#define CLOCK_PIN 7
int BRIGHTNESS=0;

CRGB leds[NUM_LEDS];

void setup()

{
FastLED.addLeds<SK9822, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
FastLED.setBrightness( BRIGHTNESS );

}

void loop() {

FastLED.setBrightness( BRIGHTNESS );
leds[0] = 0x080000;
leds[2] = 0x000800;
leds[4] = 0x000008;
leds[6] = 0x404040;

FastLED.show();
delay(200);

FastLED.setBrightness( 0 );
leds[0] = 0x000000;
leds[2] = 0x000000;
leds[4] = 0x000000;
leds[6] = 0x000000;

    FastLED.show(); 
    delay(200); 
    BRIGHTNESS=BRIGHTNESS+1;
    if(BRIGHTNESS==255) {BRIGHTNESS=0;}

}