LED Following Light Display

Hello,

New timer. I would like to eventually use a programmable led strip. This is a simple code i wrote with the idea of using 5 LED's. I goal of this project is to have led's lined up horizontally and have sensors that detect where you are along the strip. It would then brightly light that corresponding LED and having slightly bright LED's next to it. Also if you move it would continue to turn on the corresponding LED's.

I wanted to check. When the led's are suppose to turn off I want them to fade out. I would like to know if the fade out of a dimmer led would interfere with moving to the next led that while fading down should turn on complete brightness.

(please ignore pins, not sure which im using at this time)

int led1 = 9;
int led2 = 10;
int led3 = 11;
int led4 = 12;
int led5 = 13;

int high = 255;
int mid = 127;
int fade = 5;

void setup(){
Serial.begin()
}

void loop(){
int sensor1 = analogRead(A0);
int sensor2 = analogRead(A1);
int sensor3 = analogRead(A2);
int sensor4 = analogRead(A3);
int sensor5 = analogRead(A4);

if(sensor1 > 0) {
analogWrite(led1, high);
analogWrite(led2, mid);

if(sensor1 == 0 && led1 >0){
high = high - fade;
mid = mid - fade;
analogWrite(led1, high);
analogWrite(led2, mid);
}

}

if(sensor2 > 0){
analogWrite(led1, mid);
digitalWrite(led2, high);
analogWrite(led3, mid);

if(sensor2 == 0 && led2 >0){
high = high - fade;
mid = mid - fade;
analogWrite(led1, mid);
analogWrite(led2, high);
analogWrite(led3,mid);
}
}

if(sensor3 > 0){
analogWrite(led2, mid);
digitalWrite(led3, high);
analogWrite(led4, mid);

if(sensor3 == 0 && led3 >0){
high = high - fade;
mid = mid - fade;
analogWrite(led2, mid);
analogWrite(led3, high);
analogWrite(led4, mid);
}
}

if(sensor4 > 0){
analogWrite(led3, mid);
digitalWrite(led4, high);
analogWrite(led5, mid);

if(sensor4 == 0 && led4 >0){
high = high - fade;
mid = mid - fade;
analogWrite(led3, mid);
analogWrite(led4, high);
analogWrite(led5, mid);
}
}

if(sensor5 > 0){
analogWrite(led4, mid);
digitalWrite(led5, high);

if(sensor5 == 0 && led5 >0){
high = high - fade;
mid = mid - fade;
analogWrite(led4, mid);
analogWrite(led5, high);
}
}

I would like to know if the fade out of a dimmer led would interfere with moving to the next led that while fading down should turn on complete brightness.

No interference; you can code to fade one out while fading the next one up.
That is also how you make an RGB LED display all colors - it's the mix of three colors determined by the PWM value applied to each.

Im also just beginning to think that I should take out all the nested IF statements for the fade out and make them all while loops out side of those if statements to basically always say fade until 0 Unless i come into that LED's sensor.