Apprentice coder

Riva -

Yes Riva regarding the comments, I know that I should have them (slaps back of own wrist :grin: ) as they help to explain my intentions, and sometimes it's easy to forget what you were initially trying to achieve. With the actual pin Count reference in the two for loops of void loop
Quote from your comment -

for(int i = 0; i < pinCount-1; i++) // Loop through array from 0 to pinCount-2 (Should be i < pinCount)

if I change pinCount - 1 to pinCount in both for loops LED's 1 and 8 will flash on / off four times each while LED's 2 - 7 still flash at the set rate of on / off twice, so I am a little confused there. Thanks for the help and in future I will comment on all my code.

Lloyddean -

So if I might paraphrase your explanation. In your flashLED function, you are setting pin to to a value opposite to what it was last set to. This is achieved by the ! in front of digitalRead. Effectively this function turns the LED on / delay / off , on / delay / off a number of times as dictated by the numeral 8 in this section of void loop -

flashLED(pinsLEDS*, 8 );*
So in a basic digitalWrite you nominate a pin and then a value (usually HIGH or LOW) In your flashLED function you set the value via !digitalRead(pin) which inverts the last value of digitalWrite generating the "flashing effect"
The way that I am looking at it, that takes care of the "what to do" part of the function but the "when to do it" part -
for ( unsigned int i = repeat * 2; i--; )
and the -
void flashLED(uint8_t pin, int repeat)
sections still confuse me. I hope that from my explanation it sounds like some of your hard work here is starting to pay off. Thanks Pedro.