Cannot write to 2D int array

Hi,
I have in beggining of code created 2D int array (it should be global)

int vyrovnavacileds[15][5];

Anywhere else, I write some values to it

      vyrovnavacileds[interval][0] == from;
      vyrovnavacileds[interval][1] == to;
      vyrovnavacileds[interval][2] == r;
      vyrovnavacileds[interval][3] == g;
      vyrovnavacileds[interval][4] == b;

And in another part of code, I tried to read from it

for(int i = 0; i < interval; i++)
{
        from = vyrovnavacileds[i][0];
        to = vyrovnavacileds[i][1];
        value.r = vyrovnavacileds[i][2];
        value.g = vyrovnavacileds[i][3];
        value.b = vyrovnavacileds[i][4];
}

But when I immediately print the values

        Serial1.print(from);
        Serial1.print(";");
        Serial1.print(to);
        Serial1.print(";");
        Serial1.print(value.r);
        Serial1.print(";");
        Serial1.print(value.g);
        Serial1.print(";");
        Serial1.println(value.b);

I get only 0;0;0;0;0.
So I tried to read the values immediately after writing them to the array

      vyrovnavacileds[interval][0] == from;
      vyrovnavacileds[interval][1] == to;
      vyrovnavacileds[interval][2] == r;
      vyrovnavacileds[interval][3] == g;
      vyrovnavacileds[interval][4] == b;


      Serial1.print("uklad"); //prints values saved to field
      Serial1.print(vyrovnavacileds[interval][0]);
      Serial1.print(vyrovnavacileds[interval][1]);
      Serial1.print(vyrovnavacileds[interval][2]);
      Serial1.print(vyrovnavacileds[interval][3]);
      Serial1.println(vyrovnavacileds[interval][4]);
      

      //prints values, that I'm saving to the array
      Serial1.print(from); 
      Serial1.print(";");
      Serial1.print(to);
      Serial1.print(";");
      Serial1.print(r);
      Serial1.print(";");
      Serial1.print(g);
      Serial1.print(";");
      Serial1.print(b);
      Serial1.print(";");
      Serial1.println(interval);

I get output
uklad00000
10;14;255;0;0;1
→ I saved values 10;14;255;0;0. If I read them, thea are 0;0;0;0;0

What’s wrong?

complete code:

//reads data from serial port and lights the LED strip

#include <WS2812.h>
int striplen = 120;
WS2812 LED(striplen);
cRGB value;

int vstup;
int from;
int to;
int r;
int g;
int b;
int interval;
int check;
int reccheck;
boolean checkpass = false;
int vyrovnavacileds[15][5];


void setup()
{
  LED.setOutput(5);
  Serial.begin(9600);
  Serial.setTimeout(5);
  Serial1.begin(9600);
  value.r = 0;
  value.g = 0;
  value.b = 0;
  for(int _ = 0; _ < striplen; _++)
  {
   LED.set_crgb_at(_, value);
  }
  LED.sync();
}
void loop()
{
  if(Serial.available())
  {



    cti();
    if(vstup == 98)
    {
      Serial1.println("vs");
      Serial1.println(String(vstup));
      zpracuj();
    }
    else
    {

    }

  }
}

void cti()
{

  vstup = Serial.read();

  return;
  char precteno[1];
  int bytes;
  bytes = Serial1.readBytes(precteno, 1);
  vstup = precteno[0];
}

void zpracuj()
{


  cti();
  if(vstup < 128) //neni zovrazvaci zprava
  {
    Serial1.println("i");
    Serial1.println(vstup);
    from = int(vstup);
    cti();
    Serial1.println("i");
    Serial1.println(vstup);
    to = vstup;
    cti();
    Serial1.println("i");
    Serial1.println(vstup);
    r = vstup;
    cti();
    Serial1.println("i");
    Serial1.println(vstup);
    g = vstup;
    cti();
    Serial1.println("i");
    Serial1.println(vstup);
    b = vstup;
    if(interval < 15)
    {
      interval = 1; //to make sure, that nothing is wrong with index
      vyrovnavacileds[interval][0] == from;
      vyrovnavacileds[interval][1] == to;
      vyrovnavacileds[interval][2] == r;
      vyrovnavacileds[interval][3] == g;
      vyrovnavacileds[interval][4] == b;
      Serial1.print("uklad");
      Serial1.print(vyrovnavacileds[interval][0]);
      Serial1.print(vyrovnavacileds[interval][1]);
      Serial1.print(vyrovnavacileds[interval][2]);
      Serial1.print(vyrovnavacileds[interval][3]);
      Serial1.println(vyrovnavacileds[interval][4]);
      
      value.r = r;
      value.g = g;
      value.b = b;
      for(int led = from; led < to +1; led++)
      {
        LED.set_crgb_at(led, value);
      }
      
      Serial1.print(from);
      Serial1.print(";");
      Serial1.print(to);
      Serial1.print(";");
      Serial1.print(r);
      Serial1.print(";");
      Serial1.print(g);
      Serial1.print(";");
      Serial1.print(b);
      Serial1.print(";");
      Serial1.println(interval);
      interval++;
    }





  }

  else if(vstup == 130) //konrolní součet
  {
    Serial1.println("ks");
    cti();
    check = 0;
    reccheck = vstup;
    for(int a = 0; a < 15; a++)
    {
      for(int b = 0; b < 5; b++)
      {
        check +=  vyrovnavacileds[a][b];
      }
    }
    check = check % 256;
    Serial1.println("checkcount ");
    Serial1.println(check);
    reccheck = reccheck % 256;
    Serial1.println(reccheck);



  }

  else if(vstup > 130) //zobrazovani
  {
    Serial1.println("zobr");
    if(check = reccheck)
    {
      Serial1.println("chok");
      //kod pro zobrazeni
      for(int i = 0; i < interval; i++)
      {
        from = vyrovnavacileds[i][0];
        to = vyrovnavacileds[i][1];
        value.r = vyrovnavacileds[i][2];
        value.g = vyrovnavacileds[i][3];
        value.b = vyrovnavacileds[i][4];
        Serial1.print(from);
        Serial1.print(";");
        Serial1.print(to);
        Serial1.print(";");
        Serial1.print(value.r);
        Serial1.print(";");
        Serial1.print(value.g);
        Serial1.print(";");
        Serial1.println(value.b);
        for(int led = from; led < to + 1; led++)
        {
          LED.set_crgb_at(led, value);


        }
      }
      interval = 0;
      LED.sync();
    }
    else
    {
      Serial1.print("che:"  );
      Serial1.print(check);
      Serial1.print(";");
      Serial1.println(reccheck);
    }

  }
}

Thanks.
(sorry for my english)

The following:

     vyrovnavacileds[interval][0] == from;
      vyrovnavacileds[interval][1] == to;
      vyrovnavacileds[interval][2] == r;
      vyrovnavacileds[interval][3] == g;
      vyrovnavacileds[interval][4] == b;

are not assignment statements, which is a single equal sign. That's a starting point...

      interval = 1; //to make sure, that nothing is wrong with index

Array's start from 0. But in this case you will only ever write to entry 1.

Mark

  cti();
  if(vstup < 128)

-1 is less than 128

vyrovnavacileds[interval][0] == from;

That’s not an assignment.

holmes4: Array's start from 0. But in this case you will only ever write to entry 1.

Yes, it starts from 0, but I write to 1 and read from 1, so this shouldn't be the problem.

econjack: The following:

     vyrovnavacileds[interval][0] == from;
      vyrovnavacileds[interval][1] == to;
      vyrovnavacileds[interval][2] == r;
      vyrovnavacileds[interval][3] == g;
      vyrovnavacileds[interval][4] == b;

are not assignment statements, which is a single equal sign. That's a starting point...

So how can I assign values to the array? //EDIT: Oh, == and = ? Error was between chair and computer.

With the assignment operator "="