Howdy fellas,

Just a note on this subject. I have played with this extensively too. It works outstanding for a one time setup where you calibrate the CDS cell for that application but when I started using multiple setups everyone of them was different. I had to calibrate them all. Variance in the CDS cell alone would drive me crazy. Some would not work at all out of the same batch.

If you do figure this out remember to set the port low after the POT command so you don't draw any more excessive current when you are not reading the port.