Serial communication

Hi!
I was writing this “test” code:

#define DEF 800
int sin1[DEF];
int x;
void setup()
{
  
  Serial.begin(9600);
  Serial.println("start");
  for(x=0; x<DEF;x++)
  {
    sin1[x]=100*sin(x);
  }
}
void loop()
{
  for(x=0; x<DEF; x++)
  {
    Serial.println(x);
  }
  delay(10000);
}

Moderator edit: colour tags swapped for code tags

when I discover, that when I change “DEF = 4000” the monitor Serial doesn’t work (and I don’t know, if arduino works). anyone can explain me, what happen with it?

Ask yourself, "how much RAM does my board have?"

:sweat_smile: I feel right now total stupid XD thank you, it was so evident... :blush:

It catches out so many people, I wouldn't feel too bad.