I made this part of the sketch but i don't know how continue.
I know only, i have to continue with switch/case. When i press the first button i open the first led, if i press it again i close the first led and i open the second if i press it again i close the second and i open the third. If i press the second button i close the third led and i open the second if i press it again i close the second led and i open the first led.
int led1=11;
int led2=12;
int led3=13;
int buttonUp=2;
int buttonDown=3;
int led=1;
void setup() {
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT);
pinMode (led3, OUTPUT);
pinMode (buttonUp, INPUT);
pinMode (buttonDown, INPUT);
digitalWrite(buttonUp, HIGH);
digitalWrite(buttonDown, HIGH);
}
void loop() {
if (digitalRead(buttonUp)==0){
led++;
if (led>3){
led=1;
}
delay (500);
}
if (digitalRead(buttonDown)==0){
led--;
if(led<1){
led=3;
}
delay (500);
}
}