I have a light sensor which reads light intensity from 0 to 4095. I struggling to to write an equation using the inverse-square law of light so that when the light is lowest (let's say lowest ambient light is 50), it returns 1, and if highest (4095), it returns 26, but crucially the increments from 1 to 26 require the light to increase exponentially i.e.:
123 4 5 6 7 8 9 10 ...27
light intensity ->
Any suggestions of an equation? I can't seem to figure it out. Language is C.