I fail to see my mistake!!
I am relearning a lot of things, and I am trying to use HSV in the “moving pixel” example
the original example:
#include <FastLED.h>
#define NUM_LEDS 10
#define DATA_PIN 23
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
for(int dot = 0; dot < 10; dot++) {
leds[dot] = CRGB::Red;
FastLED.show();
leds[dot] = CRGB::Black;
delay(30);
}
}
my modification for HSV:
#include <FastLED.h>
#define NUM_LEDS 10
#define DATA_PIN 23
CRGB leds[NUM_LEDS];
CHSV hsvs[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
hsv2rgb_rainbow(hsvs,leds,NUM_LEDS);
for(int dot = 0; dot < 10; dot++) {
hsvs[dot] = CHSV(255,255,255);
FastLED.show();
hsvs[dot] = CHSV(255,255,0);
delay(30);
}
}
the result: every pixel off
what am I doing wrong?