Everything was fine, it shows analog value of 149-152 on idle (room lighting) , i did some experiment by blocking the light (70-80) and using flash from my phone (850). And then i got curious, i put my flash so close to the sensor (but no direct contact) until it reached value of 996. But when i turned off the flash light, the value went down to 117-120, instead of 149-152. I reset the power, reupload the code, reinstall the sensor, none of these give back the previous idle value.
I tried another light sensors (i bought 5 of this), and they all shows values between 144-155 (meaning ambient light still the same). I'm curious if this a common behaviour? I'm worried if i leave it under the sun for a long time it would degrade/burnt in a short time.
You realize LDRs are very sensitive to temperature, not just light? They will be self-heating and also receiving heat from the
strong light source, thus changing resistance.
If you want to measure light, photodiodes are the thing to use, they are linear and stable.
Probably not, there is a spectral response curve as well as tolerances. They are also temperature sensitive. They are not exact. One of the tests they use is: Light Resistance is measured at 10 lux with a standard light A(2854K-color temperature) and 2 hour preillunmination at 400 - 600 lux prior to testing. You should get the data sheet and read it. You give numbers that show a difference but they are not correlated to any real value nor do you show the circuit. All of this would be helpful. To get other then approximate calibration you will need to have a valid reference and or measuring device.
I found a better option to measure light is with a LUX sensor, such as the TSL2561 … slightly more expensive than a photo resistor, but very well worth (imho).