Hi,
I have been testing the CHSV function, and have some strange issues when changing the saturation. This is using a LPD8086 strip, teensy 3 with RC3.
My sketch first cycles through the hues, which seems to work as expected, then saturation, which seem to give me some strange results, depending on which color I start with. If I have a hue of 160, which is blue, it starts off with white, then flashes to yellow and then goes to cold white before ending up in the blue color.
The brightness cycle works more or less as expected, but the performance is kind of sluggish, it fades up to red, but some of the pixels hang for a bit when cutting to 0 brightness.
Does this mean that the conversion from HSV to RGB is slowing down things?
Another thing that indicates this is that when I upload the hsv code I need to disconnect my ledstrip to have a successful upload, this is not the case if I upload rgb based code that I normally use.
Or is my code example bad, giving the teensy too much to do?
Here is the code:
#include “FastSPI_LED2.h”
#define NUM_LEDS 120
struct CRGB leds[NUM_LEDS];
void setup() {
// sanity check delay - allows reprogramming if accidently blowing power w/leds
delay(2000);
FastLED.addLeds<LPD8806, BRG>(leds, NUM_LEDS); //my strip is BRG ordered
}
void loop() {
//HUE
for(int x = 0; x < 255; x++) {
LEDS.showColor(CHSV(x, 255, 255));
delay(20);
}
LEDS.showColor(CHSV(0, 0, 0));
delay(1000);
//SATURATION
for(int x = 0; x < 255; x++) {
LEDS.showColor(CHSV(160, x, 255));
delay(20);
}
LEDS.showColor(CHSV(0, 0, 0));
delay(1000);
//BRIGHTNESS
for(int x = 0; x < 255; x++) {
LEDS.showColor(CHSV(255, 255, x));
delay(20);
}
LEDS.showColor(CHSV(0, 0, 0));
delay(1000);
}