Programming a shift register to simulate a clock

Hello arduino folks,

This is my first time posting on this forum but i have been reading some posts for a while.

I'm a first year Electrical engineering student. I have a schoolproject where we have to build a clock.
We as a group decided to do this with 74hc595 chips and tons of RGB LEDs.

Now i built a circuit with 16 RGB LEDS and 4 74hc595 (i'm using the red and the blue pins of the RGBS)

I have a question about the code. I basically want the red LED(of the RGB) to switch to the next LED of the sequence every 1 second(second counter)
, while the blue LED stays in place at the first LED of the sequence.
Then after 16 seconds i want the blue LED to jump to the next LED in the sequence ( the minute counter).
Then the RED LED restarts its sequence.

I would really appreciate some help with this because we have been stuck at this point of the project for a while.
If you have any questions regarding our specifications i would be glad to answer them.

Here is how our current code looks like.
(Code tags added by moderator)

int dataPin = 2;        //Define which pins will be used for the Shift Register control
int latchPin = 3;
int clockPin = 4;

int dataPin1 = 5;
int latchPin1 = 6;
int clockPin1 = 7;

int seq2[16] = {0,0,0,0,0,0,0,0,1,2,4,8,16,32,64,128};  //The array for storing the 
						// byte #1 value
int seq1[16] = {1,2,4,8,16,32,64,128,0,0,0,0,0,0,0,0};  //The array for storing the 
						// byte #2 value
int seq3[16] = {0,0,0,0,0,0,0,0,1,2,4,8,16,32,64,128};
int seq4[16] = {1,2,4,8,16,32,64,128,0,0,0,0,0,0,0,0};

void setup()
{
    pinMode(dataPin, OUTPUT);       //Configure each IO Pin
    pinMode(latchPin, OUTPUT);
    pinMode(clockPin, OUTPUT);
    
    pinMode(dataPin1, OUTPUT);
    pinMode(latchPin1, OUTPUT);
    pinMode(clockPin1, OUTPUT);
}

void loop()
{
    for (int x = 0; x < 16; x++)         //Array Index
    {
        
        digitalWrite(latchPin, LOW);            //Pull latch LOW to start sending data
      
        shiftOut(dataPin, clockPin, MSBFIRST, seq1[x]);         //Send the data byte 1
        shiftOut(dataPin, clockPin, MSBFIRST, seq2[x]);         //Send the data byte 2
        digitalWrite(latchPin, HIGH);           //Pull latch HIGH to stop sending data
        delay(500);
        

    }
         if (int seq2 = 128){
          for (int x = 0; x < 16; x++){
        digitalWrite(latchPin1, LOW);
        
        shiftOut(dataPin1, clockPin1, MSBFIRST, seq4[x]);
        shiftOut(dataPin1, clockPin1, MSBFIRST, seq3[x]);
        digitalWrite(latchPin1, HIGH);           //Pull latch HIGH to stop sending data
        delay(1000);
          }
        }

}

Now you see why we ask you to use code tags.

I deleted the duplicate post - do not cross-post, it wastes time.

int seq2[16] = {0,0,0,0,0,0,0,0,1,2,4,8,16,32,64,128};

You don't have a lot of RAM.
Wasting one byte for every byte used isn't a good strategy.

Thanks for the reply.

My bad, i thought i deleted the first post.

What would you suggest as a better strategy. Its my first time really programming with the arduino.

On the other hand, its only 64 bytes of 2048, so not that big of a deal.

What does the sequence do now that is different than what you want?

This comment isn't quite correct:
//Pull latch HIGH to stop sending data

Technically, the data is clocked into the output register on this rising edge.

Yeah i'm using the arduino mega so i guess there are bytes enough.

It now finishes the blue cycle ( so blue goes from LED 1 to LED 16) then it stays at 16. Then RED starts its cycle from 1 to 16 (while the blue one is still ON on 16).. when it reaches 16 blue starts again. and this continues.

Try a double = here:

if (int seq2 = 128){

= is assignment
== is comparison

Everyone gets caught with that.