help needed to flash a circuit

Hello,

I have the following sketch:

int led = 13;
int led1 = 3; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 1; // how many points to fade the LED by
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
pinMode(8, OUTPUT);
pinMode(3, OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);
delay(500);
digitalWrite(8, HIGH);
delay(0);

// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;

// reverse the direction of the fading at the ends of the fade:
if (brightness == 0 || brightness == 150) {
fadeAmount = -fadeAmount;
}
// fade in from min to max in increments of 5 points:
for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {
// sets the value (range from 0 to 255):
analogWrite(led1, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(2000);
}

// fade out from max to min in increments of 5 points:
for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {
// sets the value (range from 0 to 255):
analogWrite(led1, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
}

What i am trying to achieve is have Pin 13 (flashing lights) actively flashing at the same time as pin 8 (dimmer) is running through its dimmer cycle.

At the moment pin 13 is only flashing once when the pin 8(dimmer) has finished dimming. Its almost like the flasher is waiting for the dimmer circuit to finish before it activates.

If i put the pin 13 on its own flashing sketch it works fine so its connected correctly and when i plug the power source in it flashes.

Hello Drewga,
Welcome.

You need to re-write your code to get rid of all the delays and use millis timing instead. Each of your delays stops anything else from happening.

Please study blink without delay, which is in the examples in the IDE under digital and apply the lessons learnt to your code.
Also study
Using millis for timing
Demonstration for several things at the same time

Can you also read and take note of:
General guidance and
How to use this forum
Especially item #7 on posting code.
Thank you.