3 led go high and off with interrupt and millis, would be nice with more veriabe

int led_array[] ={ 10, 11, 12 };
int led_count = 3;

volatile int led_pos = 0;

int button_pin = 2;
unsigned long previousMillis = 0;
const long period = 500;
int ledState = HIGH;

void change() {
led_pos = (led_pos +1) % 4;
}

void setup() {
for (int this_led =0; this_led < led_count; this_led++){
// hier pak ik het value van de array en set de pinmode out
pinMode(led_array[this_led], OUTPUT);
//set vlue pin te low zodat die uit is
digitalWrite(led_array[this_led], LOW);
}

pinMode(button_pin, INPUT);
//attachInterrupt(digitalPinToInterrupt(2), RISING, CHANGE);
attachInterrupt(0, change, RISING);
}
void loop() {
for (int this_led = 0; this_led < led_count; this_led++){
if( this_led == led_pos ){
digitalWrite(led_array[this_led], HIGH);
} else {
digitalWrite(led_array[this_led], LOW);

unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= period) {
previousMillis = currentMillis;
if (led_array[this_led] == HIGH) {
(led_array[this_led])= LOW;
} else {
ledState = HIGH;
}
}
}
}
}

Eigen_Project.ino (1.79 KB)

I would like to make this code work

What do you want to vary ?

Apart from experimenting with functionality there is no need to use interrupts to do what are doing

Yes, that's correct but i would like to make this work with them if it's possible. I would also like to make the mills command work. There is something wrong with my code concerning mills function.

Please explain in words what you would like the program to do and what it does now

what the program does now : each time pressed on "button" it changes from led also changing led brightness.

What i want it to do : If pressed on button i would like it to roam between these 3 leds changing brightness between leds and then stopping when i press on "button" again.

Should the change of brightness be linear or random and what will determine the upper and lower limits and the time between changes of brightness ?