Expected unqualified-id before '{' token light pattern

hi I’m new to the program and all that I’m getting the error: expected unqualified-id before ‘{’ token

so I put this code in. sorry it’s long.
`
{
void blink_15()

int t = 80;
digitalWrite(led1, HIGHigitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);

digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led1, HIGH);
delay(t);

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);

digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led1, HIGH);
delay(t);

}
`
so I put a space before ‘{’ and I still get the error

When you declare a function, the ‘{’ that starts the body of the function goes AFTER the ‘)’ that ends the argument list of the function.

ok I’ll give it a try

ok it work for all but one in a whole code and that one says error: a function-definition is not allowed here before ‘{’ token

Sounds like you have another ‘{’ or ‘}’ in the wrong place. You can’t have a function defined inside a function so if a function has too many ‘{’ or too few ‘}’ the next function will be inside it and generate an error.

Exactly why you should not post a SNIPPET OF CODE. You need to post your full code, as you may have multiple errors that need looking into. :slight_smile:

ive got over 2k lines of code
but ok here you are


int led0 = 1;
int led1 = 3;
int led2 = 5;
int led3 = 7;
int led4 = 9;
int led5 = 11;
int led6 = 13;
int led7 = 15;
int led8 = 17;
int led9 = 19;
int led10 = 21;


void setup() {
  pinMode(led0, OUTPUT);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);
  pinMode(led6, OUTPUT);
  pinMode(led7, OUTPUT);
  pinMode(led8, OUTPUT);
  pinMode(led9, OUTPUT);
  pinMode(led10, OUTPUT);


}

void loop()
{










}

/////////////pattern 1///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_1()
{
  int t = 80;





  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);

  //////////////////////////



  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
  delay(t);







}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 2///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_2()
{
  int t = 80;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
  delay(t);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 3///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_3()
{
  int t = 150;

  digitalWrite(led1, HIGH );

  digitalWrite(led3, HIGH);

  digitalWrite(led5, HIGH);

  digitalWrite(led7, HIGH);

  digitalWrite(led9, HIGH);

  digitalWrite(led2, LOW);

  digitalWrite(led4, LOW);

  digitalWrite(led6, LOW);

  digitalWrite(led8, LOW);

  digitalWrite(led10, LOW);


  digitalWrite(led1, LOW );

  digitalWrite(led3, LOW);

  digitalWrite(led5, LOW);

  digitalWrite(led7, LOW);

  digitalWrite(led9, LOW);

  digitalWrite(led2, HIGH);

  digitalWrite(led4, HIGH);

  digitalWrite(led6, HIGH);

  digitalWrite(led8, HIGH);

  digitalWrite(led10, HIGH);
  delay(t);







  digitalWrite(led1, HIGH );

  digitalWrite(led3, HIGH);

  digitalWrite(led5, HIGH);

  digitalWrite(led7, HIGH);

  digitalWrite(led9, HIGH);

  digitalWrite(led2, LOW);

  digitalWrite(led4, LOW);

  digitalWrite(led6, LOW);

  digitalWrite(led8, LOW);

  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led1, LOW );

  digitalWrite(led3, LOW);

  digitalWrite(led5, LOW);

  digitalWrite(led7, LOW);

  digitalWrite(led9, LOW);

  digitalWrite(led2, HIGH);

  digitalWrite(led4, HIGH);

  digitalWrite(led6, HIGH);

  digitalWrite(led8, HIGH);

  digitalWrite(led10, HIGH);
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);







}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 4///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_4()
{
  int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led9, LOW );
  delay(t);

  digitalWrite(led10, LOW );
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 5///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_5()
{
 
  int t = 70;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);



  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 6///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_6()
{
  int t = 70;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led1, HIGH);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led1, HIGH);
  delay(t);



  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 7///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_7()
{
  int t = 60;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);




  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led1, LOW);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);




  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  /////////////pattern 8///////////////////////////////////////////////////////////////////////////////////////////////////
{
void blink_10()
}
int t = 100;


  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);


  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 9///////////////////////////////////////////////////////////////////////////////////////////////////
{
void blink_10()
}
int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led9, LOW );
  delay(t);

  (led10, LOW );
  delay(t);


  digitalWrite(led11, LOW );
  delay(t);

  digitalWrite(led12, LOW );
  delay(t);

  digitalWrite(led13, LOW );
  delay(t);


  digitalWrite(led13, HIGH );
  delay(t);

  delay(t);

  igitalWrite(led13, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led11, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led10, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led9, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led2, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led1, LOW );
  delay(t);









  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 10///////////////////////////////////////////////////////////////////////////////////////////////////
{
  void blink_12()
}

  int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led8, LOW );
  delay(t);

  (led9, LOW );
  delay(t); (led10, LOW);
  delay(t);


  delay(t);

  delay(t);
  delay(t);


  delay(t);
  digitalWrite(led12, HIGH);
  delay(t);
  lay(t);

  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led7, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  digitalWrite(led6, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  digitalWrite(led5, LOW );
  delay(t);
  digitalWrite(led1, HIGH);
  digitalWrite(led4, LOW );
  delay(t);
  digitalWrite(led3, LOW );
  delay(t);
  digitalWrite(led2, LOW );
  delay(t);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 11///////////////////////////////////////////////////////////////////////////////////////////////////
{
  void blink_13()


  int t = 90;
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, HIGH);
  digitalWrite(led6, HIGH );
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);


  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, HIGH);
  digitalWrite(led6, HIGH );
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);


}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 12///////////////////////////////////////////////////////////////////////////////////////////////////
{
void blink_14()

  int t = 80;

  digitalWrite(led1, HIGHigitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);

digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
delay(t);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);



digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, LOW);
digitalWrite(led6, LOW);
digitalWrite(led7, LOW);
digitalWrite(led8, LOW);
digitalWrite(led9, LOW);
digitalWrite(led10, LOW);


}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 13///////////////////////////////////////////////////////////////////////////////////////////////////
{
void blink_15()


  int t = 80;
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);

digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led1, HIGH);
delay(t);

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);
digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
delay(t);
digitalWrite(led7, HIGH);
delay(t);
digitalWrite(led7, LOW);
delay(t);
digitalWrite(led6, HIGH);
digitalWrite(led8, HIGH);
delay(t);

digitalWrite(led6, LOW);
digitalWrite(led8, LOW);
digitalWrite(led5, HIGH);
digitalWrite(led9, HIGH);
delay(t);
digitalWrite(led5, LOW);
digitalWrite(led9, LOW);
digitalWrite(led4, HIGH);
digitalWrite(led10, HIGH);
delay(t);
digitalWrite(led4, LOW);
digitalWrite(led10, LOW);
digitalWrite(led3, HIGH);
delay(t);
digitalWrite(led3, LOW);

digitalWrite(led2, HIGH);
digitalWrite(led2, LOW);

digitalWrite(led1, HIGH);
delay(t);

}

Well the braces are mainly wrong on all the functions, you use led11,12,13 etc which you haven’t declared, you have some functions duplicated, etc etc.

function definitions should look like:

void blah ()
{
  ...
  ...
}

Fix these structural problems first - auto-indent may help you find them. In C and C++ you cannot nest function declarations (its a limitation of the language).

You probably need to learn about arrays and data-driven programming so you can greatly
shorten and simplify your code too, but get it working first :slight_smile:

If you use an array of LED pin numbers and loops, your sketch would be WAY shorter and easier to maintain.

Here is your sketch with a BUNCH of typos fixed:

int led0 = 1;
int led1 = 3;
int led2 = 5;
int led3 = 7;
int led4 = 9;
int led5 = 11;
int led6 = 13;
int led7 = 15;
int led8 = 17;
int led9 = 19;
int led10 = 21;


void setup()
{
  pinMode(led0, OUTPUT);
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);
  pinMode(led6, OUTPUT);
  pinMode(led7, OUTPUT);
  pinMode(led8, OUTPUT);
  pinMode(led9, OUTPUT);
  pinMode(led10, OUTPUT);


}

void loop()
{










}

/////////////pattern 1///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_1()
{
  int t = 80;





  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);

  //////////////////////////



  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
  delay(t);







}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 2///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_2()
{
  int t = 80;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
  delay(t);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 3///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_3()
{
  int t = 150;

  digitalWrite(led1, HIGH );

  digitalWrite(led3, HIGH);

  digitalWrite(led5, HIGH);

  digitalWrite(led7, HIGH);

  digitalWrite(led9, HIGH);

  digitalWrite(led2, LOW);

  digitalWrite(led4, LOW);

  digitalWrite(led6, LOW);

  digitalWrite(led8, LOW);

  digitalWrite(led10, LOW);


  digitalWrite(led1, LOW );

  digitalWrite(led3, LOW);

  digitalWrite(led5, LOW);

  digitalWrite(led7, LOW);

  digitalWrite(led9, LOW);

  digitalWrite(led2, HIGH);

  digitalWrite(led4, HIGH);

  digitalWrite(led6, HIGH);

  digitalWrite(led8, HIGH);

  digitalWrite(led10, HIGH);
  delay(t);







  digitalWrite(led1, HIGH );

  digitalWrite(led3, HIGH);

  digitalWrite(led5, HIGH);

  digitalWrite(led7, HIGH);

  digitalWrite(led9, HIGH);

  digitalWrite(led2, LOW);

  digitalWrite(led4, LOW);

  digitalWrite(led6, LOW);

  digitalWrite(led8, LOW);

  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led1, LOW );

  digitalWrite(led3, LOW);

  digitalWrite(led5, LOW);

  digitalWrite(led7, LOW);

  digitalWrite(led9, LOW);

  digitalWrite(led2, HIGH);

  digitalWrite(led4, HIGH);

  digitalWrite(led6, HIGH);

  digitalWrite(led8, HIGH);

  digitalWrite(led10, HIGH);
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);







}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 4///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_4()
{
  int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led9, LOW );
  delay(t);

  digitalWrite(led10, LOW );
  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 5///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_5()
{

  int t = 70;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);



  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 6///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_6()
{
  int t = 70;

  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led1, HIGH);
  delay(t);


  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led9, LOW);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led8, LOW);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW);
  digitalWrite(led1, HIGH);
  delay(t);



  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 7///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_7()
{
  int t = 60;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led1, LOW);
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);




  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led6, HIGH);
  delay(t);
  digitalWrite(led5, HIGH);
  delay(t);
  digitalWrite(led4, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led1, HIGH);
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led6, LOW);
  delay(t);
  digitalWrite(led5, LOW);
  delay(t);
  digitalWrite(led4, LOW);
  delay(t);
  digitalWrite(led3, LOW);
  delay(t);
  digitalWrite(led2, LOW);
  delay(t);
  digitalWrite(led1, LOW);
  delay(t);




  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
}



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 8///////////////////////////////////////////////////////////////////////////////////////////////////

void blink_10()
{
  int t = 100;


  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  // digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);


  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  // digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
  digitalWrite(led6, HIGH);
  digitalWrite(led7, HIGH);
  digitalWrite(led8, HIGH);
  digitalWrite(led9, HIGH);
  digitalWrite(led10, HIGH);
  // digitalWrite(led12, HIGH);

  delay(t);


  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);


  delay(t);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 9///////////////////////////////////////////////////////////////////////////////////////////////////

void blink_10A()
{
  int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led9, LOW );
  delay(t);

  digitalWrite(led10, LOW );
  delay(t);


  // digitalWrite(led11, LOW );
  delay(t);

  // digitalWrite(led12, LOW );
  delay(t);

  // digitalWrite(led13, LOW );
  delay(t);


  // digitalWrite(led13, HIGH );
  delay(t);

  delay(t);

  // digitalWrite(led13, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  delay(t);

  digitalWrite(led9, HIGH);
  // digitalWrite(led11, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led10, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led9, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led3, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led2, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led1, LOW );
  delay(t);









  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);



}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 10///////////////////////////////////////////////////////////////////////////////////////////////////

void blink_12()
{
  int t = 80;

  digitalWrite(led1, HIGH );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);

  digitalWrite(led4, HIGH);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led5, HIGH);
  digitalWrite(led2, LOW );
  delay(t);

  digitalWrite(led6, HIGH);
  digitalWrite(led3, LOW );
  delay(t);

  digitalWrite(led7, HIGH);
  digitalWrite(led4, LOW );
  delay(t);

  digitalWrite(led8, HIGH);
  digitalWrite(led5, LOW );
  delay(t);

  digitalWrite(led9, HIGH);
  digitalWrite(led6, LOW );
  delay(t);

  digitalWrite(led10, HIGH);
  digitalWrite(led7, LOW );
  delay(t);

  digitalWrite(led8, LOW );
  delay(t);

  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led10, LOW);
  delay(t);


  delay(t);

  delay(t);
  delay(t);


  delay(t);
  // digitalWrite(led12, HIGH);
  delay(t);
  delay(t);

  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led8, HIGH);
  // digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led7, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  digitalWrite(led6, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  digitalWrite(led5, LOW );
  delay(t);
  digitalWrite(led1, HIGH);
  digitalWrite(led4, LOW );
  delay(t);
  digitalWrite(led3, LOW );
  delay(t);
  digitalWrite(led2, LOW );
  delay(t);
  digitalWrite(led1, LOW );
  delay(t);

  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 11///////////////////////////////////////////////////////////////////////////////////////////////////

void blink_13()
{
  int t = 90;
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  // digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, HIGH);
  digitalWrite(led6, HIGH );
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  // digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);


  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  // digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led8, HIGH);
  digitalWrite(led6, HIGH );
  delay(t);
  digitalWrite(led6, LOW );
  digitalWrite(led8, LOW );
  delay(t);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW );
  digitalWrite(led9, LOW );
  delay(t);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW );
  digitalWrite(led10, LOW );
  delay(t);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW );
  // digitalWrite(led11, LOW );
  delay(t);
  digitalWrite(led2, HIGH);
  delay(t);
  digitalWrite(led2, LOW );

  delay(t);
  digitalWrite(led1, HIGH );

  delay(t);
  digitalWrite(led1, LOW );
  delay(t);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 12///////////////////////////////////////////////////////////////////////////////////////////////////

void blink_14()
{
  int t = 80;

  digitalWrite(led1, HIGH);
  digitalWrite(led1, LOW);
  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);

  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  delay(t);

  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);

  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);

  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  digitalWrite(led5, LOW);
  digitalWrite(led6, LOW);
  digitalWrite(led7, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led10, LOW);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 13///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_15()
{

  int t = 80;
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);

  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);

  digitalWrite(led1, HIGH);
  delay(t);

  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);
  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  delay(t);
  digitalWrite(led7, HIGH);
  delay(t);
  digitalWrite(led7, LOW);
  delay(t);
  digitalWrite(led6, HIGH);
  digitalWrite(led8, HIGH);
  delay(t);

  digitalWrite(led6, LOW);
  digitalWrite(led8, LOW);
  digitalWrite(led5, HIGH);
  digitalWrite(led9, HIGH);
  delay(t);
  digitalWrite(led5, LOW);
  digitalWrite(led9, LOW);
  digitalWrite(led4, HIGH);
  digitalWrite(led10, HIGH);
  delay(t);
  digitalWrite(led4, LOW);
  digitalWrite(led10, LOW);
  digitalWrite(led3, HIGH);
  delay(t);
  digitalWrite(led3, LOW);

  digitalWrite(led2, HIGH);
  digitalWrite(led2, LOW);

  digitalWrite(led1, HIGH);
  delay(t);

}

I hope @dartnashon sticks with programming and comes back to marvel at this one day. :wink:

I also hope s/he is being paid by the lines of code produced!

a7

Here is what your sketch looks like with the first three patterns converted to arrays and loops. It is 84 lines long. Your original sketch through the first three patterns is 292 lines.

const int LEDCount = 11;
const byte LEDPins[LEDCount] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21};

int PatternDelay = 80;

void setup()
{
  for (int i = 0; i < LEDCount; i++)
    pinMode(LEDPins[i], OUTPUT);
}

void loop()
{

}

void turnAllOff()
{
  for (int i = 0; i < LEDCount; i++)
    digitalWrite(LEDPins[i], LOW );
}

/////////////pattern 1///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_1()
{


  // Turn each ON in turn
  for (int i = 0; i < LEDCount; i++)
  {
    digitalWrite(LEDPins[i], HIGH );
    delay(PatternDelay);
  }

  // Turn each OFF in turn
  for (int i = 0; i < LEDCount; i++)
  {
    digitalWrite(LEDPins[i], LOW );
    delay(PatternDelay);
  }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 2///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_2()
{
  // Turn each one on briefly in turn
  for (int i = 0; i < LEDCount; i++)
  {
    digitalWrite(LEDPins[1], HIGH);
    delay(PatternDelay);
    digitalWrite(LEDPins[1], LOW);
  }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////pattern 3///////////////////////////////////////////////////////////////////////////////////////////////////
void blink_3()
{
  for (int repeat = 0; repeat < 3; repeat++)
  {
    // Odds ON
    for (int i = 1; i < LEDCount; i += 2)
      digitalWrite(LEDPins[i], HIGH );

    // Evens OFF
    for (int i = 0; i < LEDCount; i += 2)
      digitalWrite(LEDPins[i], LOW);

    delay(150);

    // Odds OFF
    for (int i = 1; i < LEDCount; i += 2)
      digitalWrite(LEDPins[i], LOW );

    // Evens ON
    for (int i = 0; i < LEDCount; i += 2)
      digitalWrite(LEDPins[i], HIGH);

    delay(150);
  }

  turnAllOff();
}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.