Having trouble with a potentiometer controlling some LEDs

Hi

I am a newb myself...but I would suggest you try changing:

val = analogRead(potPin);
val = map(val, 0, 1023, 0, 25);

to something like

int valPot=0;

valPot = analogRead(potPin);
val = map(valPot, 0, 1023, 0, 25);

are you sure that is otherwise the full sketch?

daniel