please halp me with my codes!...

I have a working code for the Arduino , I want to load all of the one button (START-STOP)

// the setup function runs once when you press reset or power the board
void setup() {

// initialize digital pin 9 as an output.
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);

digitalWrite(9, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
delay(3000); // wait for a second
digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(6, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(9, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(5, HIGH);(delay(1000)) ; digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
delay(20000); // wait for a second delay(20000);
digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(6, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(5, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
delay(20000); // wait for a second
digitalWrite(7, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(8, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(6, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

// the loop function runs over and over again forever
void loop() {

}

This code works , but only once , and I want this code to work , just click on the button...

I need help with how I have to insert a button, the LEDs illuminated on the order?!..

This code works , but only once , and I want this code to work , just click on the button...

You must know code in setup() runs once.

Move things to loop()

Get rid of all those delay()s

Look at this example, it might give you some insight:

// program to sequentially turn on and turn off 3 LEDs
 
const byte LED1 = 2;
const byte LED2 = 3;
const byte LED3 = 4;
const byte heartBeat = 13;
 
boolean blockingFlag = true;
 
unsigned long Millis13;
unsigned long lastMillis;
unsigned long wait = 3000;
 
enum States {
  StateStart, State2, State3, State4, State5, State6, State7
};
States mState = StateStart;
 
void setup()
{
  pinMode(heartBeat, OUTPUT);
 
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);
 
  delay(3000);
 
} //END of setup()
 
 
void loop()
{
  //**********************************
  //some code to check for blocking sketches
  if (millis() - Millis13 >= 200)
  {
    digitalWrite(heartBeat, !digitalRead(heartBeat)); //toggle D13
    Millis13 = millis(); //re-initalize
  }
 
  //********************************** delay() being used here
  if (blockingFlag == true)
  {
    blockingFlag = false;
    digitalWrite(13, LOW);
 
    blockingMethod();
   }
 
  //********************************** BWD being used here
  if (millis() - lastMillis >= wait)
  {
    nonBlockingMethod();
  }
 
  //Other non blocking code goes here
 
} //END of loop()
 
 
 
 
// ******************* Functions *******************
void blockingMethod()
{
  //LEDs ON
  digitalWrite(LED3, HIGH);    // turn on LED3
  delay(450);                  // wait for 450ms
  digitalWrite(LED2, HIGH);    // turn on LED2
  delay(450);                  // wait for 450ms
  digitalWrite(LED1, HIGH);    // turn on LED1
  delay(3000);                 // wait for 3000ms
 
  //LEDs OFF
  digitalWrite(LED3, LOW);     // turn off LED3
  delay(450);                  // wait for 450ms
  digitalWrite(LED2, LOW);     // turn off LED2
  delay(450);                  // wait for 450ms
  digitalWrite(LED1, LOW);     // turn off LED1
  delay(3000);                 // wait for 3000ms
 
} //END of blockingMethod()
 
 
void nonBlockingMethod()
{
  switch (mState)
  {
    //***************************    //LEDs ON
    case StateStart:
      {
        digitalWrite(LED3, HIGH);    // turn on LED3
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State2;
      }
      break;
 
    //***************************
    case State2:
      {
        digitalWrite(LED2, HIGH);    // turn on LED2
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State3;
      }
      break;
 
    //***************************
    case State3:
      {
        digitalWrite(LED1, HIGH);    // turn on LED1
        wait = 3000;                 // wait for 3000ms
        lastMillis = millis();
        mState = State4;
      }
      break;
 
    //***************************    //LEDs OFF
    case State4:
      {
        digitalWrite(LED3, LOW);     // turn off LED3
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State5;
      }
      break;
 
    //***************************
    case State5:
      {
        digitalWrite(LED2, LOW);     // turn off LED2
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State6;
      }
      break;
 
    //***************************
    case State6:
      {
        digitalWrite(LED1, LOW);     // turn off LED1
        wait = 3000;                 // wait for 3000ms
        lastMillis = millis();
        mState = State7;
      }
 
      break;
 
    //***************************
    case State7:
      {
        blockingFlag = true;
        wait = 3000;                 // wait for 3000ms
        mState = StateStart;
      }
 
      break;
 
    //***************************
    default:
      {
      }
      break;
 
  } //END of switch case
 
} //END of nonBlockingMethod()
 
// ************** END of sketch ****************

.

LarryD:
You must know code in setup() runs once.

Move things to loop()

Get rid of all those delay()s

Look at this example, it might give you some insight:

// program to sequentially turn on and turn off 3 LEDs

const byte LED1 = 2;
const byte LED2 = 3;
const byte LED3 = 4;
const byte heartBeat = 13;

boolean blockingFlag = true;

unsigned long Millis13;
unsigned long lastMillis;
unsigned long wait = 3000;

enum States {
  StateStart, State2, State3, State4, State5, State6, State7
};
States mState = StateStart;

void setup()
{
  pinMode(heartBeat, OUTPUT);

pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);

delay(3000);

} //END of setup()

void loop()
{
  //**********************************
  //some code to check for blocking sketches
  if (millis() - Millis13 >= 200)
  {
    digitalWrite(heartBeat, !digitalRead(heartBeat)); //toggle D13
    Millis13 = millis(); //re-initalize
  }

//********************************** delay() being used here
  if (blockingFlag == true)
  {
    blockingFlag = false;
    digitalWrite(13, LOW);

blockingMethod();
  }

//********************************** BWD being used here
  if (millis() - lastMillis >= wait)
  {
    nonBlockingMethod();
  }

//Other non blocking code goes here

} //END of loop()

// ******************* Functions *******************
void blockingMethod()
{
  //LEDs ON
  digitalWrite(LED3, HIGH);    // turn on LED3
  delay(450);                  // wait for 450ms
  digitalWrite(LED2, HIGH);    // turn on LED2
  delay(450);                  // wait for 450ms
  digitalWrite(LED1, HIGH);    // turn on LED1
  delay(3000);                // wait for 3000ms

//LEDs OFF
  digitalWrite(LED3, LOW);    // turn off LED3
  delay(450);                  // wait for 450ms
  digitalWrite(LED2, LOW);    // turn off LED2
  delay(450);                  // wait for 450ms
  digitalWrite(LED1, LOW);    // turn off LED1
  delay(3000);                // wait for 3000ms

} //END of blockingMethod()

void nonBlockingMethod()
{
  switch (mState)
  {
    //***************************    //LEDs ON
    case StateStart:
      {
        digitalWrite(LED3, HIGH);    // turn on LED3
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State2;
      }
      break;

//***************************
    case State2:
      {
        digitalWrite(LED2, HIGH);    // turn on LED2
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State3;
      }
      break;

//***************************
    case State3:
      {
        digitalWrite(LED1, HIGH);    // turn on LED1
        wait = 3000;                // wait for 3000ms
        lastMillis = millis();
        mState = State4;
      }
      break;

//***************************    //LEDs OFF
    case State4:
      {
        digitalWrite(LED3, LOW);    // turn off LED3
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State5;
      }
      break;

//***************************
    case State5:
      {
        digitalWrite(LED2, LOW);    // turn off LED2
        wait = 450;                  // wait for 450ms
        lastMillis = millis();
        mState = State6;
      }
      break;

//***************************
    case State6:
      {
        digitalWrite(LED1, LOW);    // turn off LED1
        wait = 3000;                // wait for 3000ms
        lastMillis = millis();
        mState = State7;
      }

break;

//***************************
    case State7:
      {
        blockingFlag = true;
        wait = 3000;                // wait for 3000ms
        mState = StateStart;
      }

break;

//***************************
    default:
      {
      }
      break;

} //END of switch case

} //END of nonBlockingMethod()

// ************** END of sketch ****************




.

but there is not Button ((((

Adding the button is something you should be able to master.
Look at the examples that come with the IDE.

Google is your friend.

.