Having trouble with a potentiometer controlling some LEDs

Suppose val is 5. What happens?
If val is less than 10, the 1st of second if blocks deal with that situation. The val >= 11 part is unnecessary, because val has to be greater than 10 in order to have gotten by the first two checks. The same holds true for all the other compound if tests, except the first one, where, apparently, the value of 5 is to be explicitly ignored (or not).

This was clearly a mistake(I'm surprised you couldn't tell), but the last else statement would have caught it. I have triple checked my LEDs too.

are you sure that is otherwise the full sketch?
daniel

Yep, all hand typed, ctrl+a - ctrl+c to copy it all.