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?!..