Hi and first of all: Amazing library! I stumbled about it when I realized my Raspberry Pi Xojo project needed an Arduino for WS2801 control, and though I never programmed in C before I find the code easy to follow and modify. Anyway, there is one issue I couldn’t find a solution for when searching this group:
For my project, I want to display a temperature chart and created a palette:
DEFINE_GRADIENT_PALETTE( celsius_outertemp ) {
0, 18, 0, 50, //deep purple, -30
38, 28, 0, 70, // just to keep the gradient flowing
80, 40, 20, 100, // -5 degrees: Color kicks in fully
96, 255, 255, 255, //white, 0
116, 0, 0, 200, //blue, +3
128, 0, 131, 160, // türkis, 10°
138, 0, 150, 118, // türkisgrün, 13 °
150, 0, 160, 0, // grün, 17°
160, 0, 130, 0, // grün, 20°
167, 0, 190, 190, // gelb, 22°
173, 210, 183, 0, // Orange, 24°
196, 200, 0, 0, // Rot, 32°
206, 230, 0, 0, // Rot, 35°
255, 230, 0, 230 }; //pink, +49
created a Palette from it:
CRGBPalette16 CelsiusPal = celsius_outertemp;
but when trying the values they are never on spot.
When I use this line:
fill_solid(LEDs, NumLEDs, CRGB(0, 130, 0));
it gives me a nice green that should be equivalent to the value of 160.
But on using ColorFromPalette, a loop like
for (int i = 160; i < 180; i++) {
fill_solid(LEDs, NumLEDs, ColorFromPalette(CelsiusPal, i, 255, LINEARBLEND));
FastLED.show();
FastLED.delay (500);
}
starts in the blue range and finishes a bit more to the green than with the first line of code, about 30 too high. Any hints what might be wrong?