Im trying to fill a full a strip of LED's that's been cut in half and double backed on itself (essentially two interconnected strips of 50 leds) using the fill_palette command from FASTLED.
However it's not filling the strip as I would expect.
#include <FastLED.h>
#define NUM_LEDS 100
#define LED_PIN 5
CRGB leds[NUM_LEDS];
DEFINE_GRADIENT_PALETTE (heatmap1_gp) {
0, 0, 0, 0, //black
128, 255, 0, 0, //red
200, 255, 255, 0, //bright yellow
255, 255, 255, 255 //full white
};
DEFINE_GRADIENT_PALETTE (heatmap2_gp) {
0, 255, 255, 255, //full white
128, 255, 255, 0, //bright yellow
200, 255, 0, 0, //red
255, 0, 0, 0, //black
};
CRGBPalette16 myPal1 = heatmap1_gp;
CRGBPalette16 myPal2 = heatmap2_gp;
void setup() {
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(50);
}
void loop() {
FastLED.clear();
fill_palette(leds, (NUM_LEDS / 4), (NUM_LEDS * 0), 9, myPal1, 255, NOBLEND);
fill_palette(leds, (NUM_LEDS / 4), (NUM_LEDS * 0), 9, myPal2, 255, NOBLEND);
fill_palette(leds, (NUM_LEDS / 4), (NUM_LEDS * 0.5), 9, myPal1, 255, NOBLEND);
fill_palette(leds, (NUM_LEDS / 4), (NUM_LEDS * 0.5), 9, myPal2, 255, NOBLEND);
FastLED.show();
}
Im hoping to get each row of the strip to look like this.
l