I can say that the POT command with LDR type of fast changing resistive devices is not quite precise.

Do you have any chance of using a PIC with ADC ?

Or have you tried your circuit with a PIC with ADC?


Also, POT command with 5K gives the best result as what I have experienced so far. Any value above 5K has not been working well for me (only with POT command though - even 10K was not good).

Also, why are you using a scale of 100? What was the reason?