I think I have, using your help, managed to get the lights to flash in sequence. I have a small problem with making it even shorter, I can call the function with
pin(led5);
pin(led6);
pin(led7);
pin(led8);
and it lights pins 5,6,7 and 8
what is the correct format to change this to a 'for' statement i.e.
for (int x=5;x < 9; x++)
{
pin(led(x));
}
I can then gradually change the value of x in the 'for' statement to call all 40 functions.