Just to leave as reference in google searches, here's a little code that reasonably compensates our vision tendency and makes it seem like a linear brightness increase.

` `

double LightLevel = 0;

double Base = 0.0039215;

while (LightLevel < 255) { // 1020 increments up to 255

analogWrite(LightLevelPin, LightLevel);

LightLevel = pow(Base, 4) ;

Base = Base + 0.0039215;

}