Im new to programming and I need a little bit of help!

I need a little bit of help with this code. Can someone please explain line by line what each line is doing to the arduino board


/*
LED Morse Code SOS Signal

Continuously turns the onboard LED on and off in the following sequence:

LED on for 0.25 seconds off for 0.5 seconds (x3)
LED on for 0.75 seconds off for 0.5 seconds (x3)
LED on for 0.25 seconds off for 0.5 seconds (x3)
Delay for 2 seconds
*/

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
int onDelay = 250;
int offDelay = 500;
int pause = 2000;
for (int a=1; a <= 3; a++){
if (a == 1 || a == 3) {onDelay = 250;}
else {onDelay = 750;}
for (int b=1; b <= 3; b++){
digitalWrite(LED_BUILTIN, HIGH);
delay(onDelay);
digitalWrite(LED_BUILTIN, LOW);
delay(offDelay);
}
}
// ---------------------------------------------------------------------------------
delay(pause);
}

All Arduino specific functions are explained here.

@wvmarle got in before me but I'll post anyway

HelloImMark:
Can someone please explain line by line what each line is doing to the arduino board

Not likely to happen. You have to show some effort. Pick out the first word, or mnemonic, if you will, on a line (like int pause = 2000;) and go to the reference page to check out the various statements and operators and syntax elements. There you'll find explanations and brief code examples.

There are also any number of C / C++ tutorials on the interwebs.

There's also a lot to be gained by clicking on the stickies at the top of each topic - especially the one about posting code in code tags.

the structure of your code will also become more obvious if you format it using CTRL-T within the Arduino IDE - before pasting here within tags... use the </> button on the toolbar.

No harm done - all newbies make this mistake.

HelloImMark:
Can someone please explain line by line what each line is doing to the arduino board

I suspect, if you take the time to think about it carefully, you will find that you have a fairly good idea what many of the lines of code do and it would be much easier to help if you identify specific things that you don't understand.

If you can't make any sense of the code then I think, as others have said, that you should start with a beginners tutorial (or book) on C programming. It would not be fair to expect people here to repeat what you can learn from many existing websites and books.

...R