/*     RAM used (bytes) to show() 1 LED vs FastLED version

                  (1) #include  (2) CRGB,addLeds<>  (3) CHSV, show()
(0) No FastLED    61
FastLED 3.3.3     74 (+13)      142 (+68)           162 (+20)
FastLED 3.4.0     74 (+13)      142 (+68)           160 (+18)
FastLED 3.5.0     74 (+13)      142 (+68)           160 (+18)
FastLED 3.6.0     74 (+13)      146 (+72)           164 (+18)
FastLED 3.7.0     74 (+13)      146 (+72)           164 (+18)
FastLED 3.7.1     74 (+13)      146 (+72)           164 (+18)
FastLED 3.7.2     74 (+13)      146 (+72)           164 (+18)
FastLED 3.7.3     74 (+13)      146 (+72)           164 (+18)
FastLED 3.7.4     74 (+13)      154 (+80)           305 (+151)
FastLED 3.7.5     74 (+13)      154 (+80)           305 (+151)
FastLED 3.7.6     74 (+13)      154 (+80)           305 (+151)
FastLED 3.7.7     74 (+13)      160 (+86)           311 (+151)
FastLED 3.7.8     74 (+13)      160 (+86)           311 (+151)
FastLED 3.9.0     78 (+17)      164 (+86)           192 (+28)
FastLED 3.9.1     78 (+17)      164 (+86)           192 (+28)
FastLED 3.9.2     78 (+17)      164 (+86)           192 (+28)

164-61 = 103 bytes for v3.7.3
311-61 = 250 bytes for v3.7.8
192-61 = 131 bytes for v3.9.0
*/

#define TEST 3

#include <TinyDebug.h>
#if (TEST >= 1)
#include <FastLED.h>
#endif

#if (TEST >= 2)
CRGB led;
#endif

void setup() {
#if (TEST >= 2)
  FastLED.addLeds<NEOPIXEL, 1>(&led, 1);
#endif
  Debug.begin();
  usedmem();
}

void loop() {
#if (TEST >= 3)
  led = CHSV(random8(), random8(), random8());
  FastLED.show();
#endif
  usedmem();
  delay(500);
}

void usedmem() {
  extern unsigned int __heap_start;
  extern void *__brkval;
  uint16_t free_memory; // address used as a surrogate for the stack pointer
  if ((uint16_t)__brkval == 0)
    free_memory = ((uint16_t)&free_memory) - ((uint16_t)&__heap_start);
  else
    free_memory = ((uint16_t)&free_memory) - ((uint16_t)__brkval);
  Debug.print(F("Used mem: "));
  Debug.println(512 - free_memory);
}
ATTINY8520PU