Logarithmic scaling for LED dimming?

Thanks Nick, I will use the F macro option!

I'm confused as to how I pull the values to subtract from the 'val' array each time through the loop?