// https://www.reddit.com/r/FastLED/comments/1glyqbu/i_cant_use_more_than_255_leds_on_my_strip_of_300/

#include <FastLED.h>

#define NUM_LEDS 300
#define LED_PIN 7

CRGB leds[NUM_LEDS];

uint8_t paletteIndex = 0;

DEFINE_GRADIENT_PALETTE (heatmap_gp) {
    0,   0,   0,   0, 
  128, 255,   0,   0,
  200, 255, 255,   0,
  255, 255, 255, 255,
};

CRGBPalette16 myPal = heatmap_gp;


void setup() {
  // put your setup code here, to run once:
  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
  // FastLED.setBrightness(50);
}


template <typename PALETTE>
void fill_palette16(CRGB* L, uint16_t N, uint16_t startIndex, uint16_t incIndex,
                  const PALETTE& pal, uint8_t brightness=255, TBlendType blendType=LINEARBLEND)
{
    uint16_t colorIndex = startIndex;
    for( uint16_t i = 0; i < N; ++i) {
        L[i] = ColorFromPalette( pal, colorIndex >> 8, brightness, blendType);
        colorIndex += incIndex;
    }
}


void loop() {
  // put your main code here, to run repeatedly:
  fill_palette16(leds, NUM_LEDS, paletteIndex << 8, 65535 / NUM_LEDS, myPal, 255, LINEARBLEND);
  FastLED.show();
}

uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
neopixels:DOUT
neopixels:VDD
neopixels:VSS
neopixels:DIN
FPS: 0
Power: 0.00W