Low memory available, stability problems may occur.

Ok new to Ardiuno's Been using Raspberry Pi's and scripts. So please no laughing (to much)at my programing (I'm def a noob) :slight_smile: Can some one explain why is this taking up a lot of memory on my nano?


#include <FastLED.h>
#define NUM_LEDS 150
#define NUM1_LEDS 150
#define NUM2_LEDS 150
#define DATA_PIN 2
#define DATA1_PIN 3
#define DATA2_PIN 6

CRGB leds[NUM_LEDS];
CRGB redleds[NUM_LEDS];
CRGB blueleds[NUM_LEDS];
CRGB whiteleds[NUM_LEDS];

void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.addLeds<NEOPIXEL, DATA1_PIN>(blueleds, NUM1_LEDS);
FastLED.addLeds<NEOPIXEL, DATA2_PIN>(redleds, NUM2_LEDS);
}

void loop() {
for (int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot] = CRGB::Blue;
blueleds [dot] = CRGB::Purple;
FastLED.show();
// clear this led for the next time around the loop
leds[dot] = CRGB::Black;
blueleds [dot] = CRGB::Black;
delay(3);
}
}

Can some one explain why is this taking up a lot of memory on my nano?

Each LED takes three bytes of memory in your buffer. You have 450 leds in total, that means you have 1350 bytes used for your LED buffers.

Now you help us. NEVER hi jack a thread this old again. Start a new one.