Create a 4 count Target board with Arduino

Hi, I am in need to seek help with my project! ><

Basically my project are to create an target board with arduino.
There will be 4 round per game.
Each round will run for 4sec.
Game can be reset only if you switch a slide switch to off and on again.

So there is:
1x Green LED (Power indicator)
1x Yellow LED (Timer for each round Blink for 4 times for 4sec)
4x Red LED for each round (If target board hit within 4sec the light for that round will turn on)
1x Slide switch (for power on and off)
2x push button (1st btn - Press to start trial) 2nd btn - Press = target hit)

As there isn’t physical hardware for all this, We are to make use of tinkerCAD to simulate the actual runnnig.

Below are my code which i try to create myself but definitely not working as what i wanted and i’m stuck…

Hope you guys could help solve my project!

const int power_LED = 13;
const int trial_LED = 12;
const int round1_LED = 11;
const int round2_LED = 10;
const int round3_LED = 9;
const int round4_LED = 8;

const int start_sw = 5;
const int next_btn = 4;
const int hit_btn = 2;

void setup()
{
pinMode(power_LED, OUTPUT);
pinMode(trial_LED, OUTPUT);
pinMode(round1_LED, OUTPUT);
pinMode(round2_LED, OUTPUT);
pinMode(round3_LED, OUTPUT);
pinMode(round4_LED, OUTPUT);

pinMode(start_sw, INPUT);
pinMode(next_btn, INPUT);
pinMode(hit_btn, INPUT);
}

void loop()
{
if (digitalRead(start_sw) == HIGH)
{
digitalWrite(power_LED, HIGH);
}
else
{
digitalWrite(power_LED, LOW);
digitalWrite(trial_LED, LOW);
digitalWrite(round1_LED, LOW);
digitalWrite(round2_LED, LOW);
digitalWrite(round3_LED, LOW);
digitalWrite(round4_LED, LOW);
}
int Cround = 1;
if (digitalRead(power_LED) == HIGH && Cround == 1 && digitalRead(next_btn) == LOW)
{
round1();
Cround+1;
}
if (digitalRead(power_LED)== HIGH && Cround == 2 && digitalRead(next_btn) == LOW)
{
round2();
Cround+1;
}
if (digitalRead(power_LED)== HIGH && Cround == 3 && digitalRead(next_btn) == LOW)
{
round3();
Cround+1;
}
if (digitalRead(power_LED)== HIGH && Cround == 4 && digitalRead(next_btn) == LOW)
{
round4();
Cround+1;
}
if (digitalRead(power_LED) == HIGH && Cround <5)
{

}
}

void round1()
{
int count = 0;
while(count <4)
{
digitalWrite(trial_LED, HIGH);
delay(500);
digitalWrite(trial_LED, LOW);
delay(500);
if(digitalRead(hit_btn) == LOW)
{
digitalWrite(round1_LED, HIGH);
count = count+4;
}
count++;
}
}

void round2()
{
int count = 0;
while(count <4)
{
digitalWrite(trial_LED, HIGH);
delay(500);
digitalWrite(trial_LED, LOW);
delay(500);
if(digitalRead(hit_btn) == LOW)
{
digitalWrite(round2_LED, HIGH);
count = count+4;
}
count++;
}
}

void round3()
{
int count = 0;
while(count <4)
{
digitalWrite(trial_LED, HIGH);
delay(500);
digitalWrite(trial_LED, LOW);
delay(500);
if(digitalRead(hit_btn) == LOW)
{
digitalWrite(round3_LED, HIGH);
count = count+4;
}
count++;
}
}

void round4()
{
int count = 0;
while(count <4)
{
digitalWrite(trial_LED, HIGH);
delay(500);
digitalWrite(trial_LED, LOW);
delay(500);
if(digitalRead(hit_btn) == LOW)
{
digitalWrite(round4_LED, HIGH);
count = count+4;
}
count++;
}
}

Below are my code which i try to create myself but definitely not working as what i wanted and i'm stuck...

So what does it do or not do ?

Please follow the advice in Read this before posting a programming question and add code tags to your sketch in your original post

Hey, Sorry for the late reply.
I had manage to solve the coding myself :slight_smile:
Sorry for the trouble ya!

hey, if u dont mind can post the coding that u solved so that we can benefit from it