[newbie] blinking and walking robot

Hello,
I'm new to this forum and Arduino in general. Please apologize if this issue already exists.
I'm making a fairly simple Arduino based two-wheel DC motor robot.
So far it can drive straight (to some extent because of the caster wheel) and turning back 180 degrees (also not very accurate cause of the caster wheel, but that's to improve :wink: )
Recently I've decided to plug in some LEDs to show the movement. So far it flashes two red LEDs when moving forward and 2 yellow when turning.
My question is: Is there a way to make the robot blink the LEDs when moving at the same time? I tried to add a procedure before movement, but all I got is blinking and then moving (pretty obvious). I want it to do at the same time.

I can provide the code when needed, it's just as simple as can be.

My question is: Is there a way to make the robot blink the LEDs when moving at the same time?

Yes.

I can provide the code when needed, it's just as simple as can be.

Over to you.

So the code looks like this:

//pin setup
const int Motor1Pin1 = 8;
const int Motor1Pin2 = 9;
const int Motor2Pin1 = 10;
const int Motor2Pin2 = 11;
const int LeftGreenLed = 6;
const int LeftYellowLed = 13;
const int RightGreenLed = 7;
const int RightYellowLed = 12;

//IO setup
void setup() {
pinMode(Motor1Pin1, OUTPUT);
pinMode(Motor1Pin2, OUTPUT);
pinMode(Motor2Pin1, OUTPUT);
pinMode(Motor2Pin2, OUTPUT);
pinMode(LeftGreenLed, OUTPUT);
pinMode(LeftYellowLed, OUTPUT);
pinMode(RightGreenLed, OUTPUT);
pinMode(RightYellowLed, OUTPUT);
}

//my loop
void loop() {
int czas = 6000;//time the robot is moving forward
digitalWrite(LeftGreenLed, HIGH);
digitalWrite(RightGreenLed, HIGH);
digitalWrite(LeftYellowLed, LOW);
digitalWrite(RightYellowLed, LOW);
GoForward();
delay(czas);
Stop();
delay(1000);
digitalWrite(LeftYellowLed, HIGH);
digitalWrite(RightYellowLed, HIGH);
digitalWrite(LeftGreenLed, LOW);
digitalWrite(RightGreenLed, LOW);
GoRight();
delay(800);
Stop();
delay(1000);
}
//forward
void GoForward(){
digitalWrite(Motor1Pin2, LOW);
digitalWrite(Motor1Pin1, HIGH);
digitalWrite(Motor2Pin2, LOW);
digitalWrite(Motor2Pin1, HIGH);
}
//backward
void GoBackward(){
digitalWrite(Motor1Pin1, LOW);
digitalWrite(Motor1Pin2, HIGH);
digitalWrite(Motor2Pin1, LOW);
digitalWrite(Motor2Pin2, HIGH);
}
//turn left
void GoLeft(){
digitalWrite(Motor1Pin1, LOW);
digitalWrite(Motor1Pin2, HIGH);
digitalWrite(Motor2Pin2, LOW);
digitalWrite(Motor2Pin1, HIGH);
}
//turn right
void GoRight(){
digitalWrite(Motor1Pin2, LOW);
digitalWrite(Motor1Pin1, HIGH);
digitalWrite(Motor2Pin1, LOW);
digitalWrite(Motor2Pin2, HIGH);
}
//robot stop
void Stop(){
digitalWrite(Motor1Pin2, LOW);
digitalWrite(Motor1Pin1, LOW);
digitalWrite(Motor2Pin1, LOW);
digitalWrite(Motor2Pin2, LOW);
}

Thank you in advance.
I know the code has extra commands for movement but I'd like to use them in the future so this is a universal starting code.

Baritoshi:
Is there a way to make the robot blink the LEDs when moving at the same time? I tried to add a procedure before movement, but all I got is blinking and then moving (pretty obvious). I want it to do at the same time.

It seems to me it's time for you to embrace BlinkWithoutDelay. It's also explained in this YouTube video.

JimboZA, I think that's what I needed.
Thank you! I will try this ASAP.