Hi all, I’ve been enjoying playing with my first Uno and some SK6812WWA LED strips. I’ve been using the FastLED library and defining/controlling them like the RGB WS2821B seems to work fine, but I have a few basic questions-
Using CHSV instead of CRGB I’m trying to control both the H (hue) and the S (Saturation), so I can adjust colour and brightness. I have part of it working but could really benefit from some expert advice 
-
All LED’s will be outputting the same, how do I talk to them all without referencing each one separately like I am currently?
leds[0] = CHSV(0,255,255);
leds[1] = CHSV(0,255,255);
leds[2] = CHSV(0,255,255);
leds[3] = CHSV(0,255,255);
leds[4] = CHSV(0,255,255);
leds[5] = CHSV(0,255,255);
To be able to reduce this to a single line like leds[0-6] = etc
- I’ve got a pot adjusting the Hue value but only by using if else statements. How do I make Hue and Value a variable and set up 10 steps for each?
I’m currently doing it inefficienctly like this -
void loop() {
int val = analogRead(1);
if (val < 125) {
leds[0] = CHSV(0,255,255);
leds[1] = CHSV(0,255,255);
leds[2] = CHSV(0,255,255);
leds[3] = CHSV(0,255,255);
leds[4] = CHSV(0,255,255);
leds[5] = CHSV(0,255,255);
FastLED.show();
}
else if (val < 250) {
leds[0] = CHSV(34,255,255);
leds[1] = CHSV(34,255,255);
leds[2] = CHSV(34,255,255);
leds[3] = CHSV(34,255,255);
leds[4] = CHSV(34,255,255);
leds[5] = CHSV(34,255,255);
an so on etc.
Any support would be much appreciated.
Rob

