LDR values are not appropriate

Hello all,

I had a doubt regarding the LDR values. I get that more light -> Lesser LDR value and vice versa.
Initially, the values were fine. My first 5 readings were in the 70s and that made sense. 6th value was 700, and that was because I covered the LDR with my finger.
But all the other values after that are “1.02 thousand”. I tried varying the amount of light falling on the LDR by using my phone’s flash light, but that made no difference. The value remained at 1.02 thousand.
I tried re doing the project, that is, unlinking the device, writing the code and the hardware setup and then linking it back again. But the value remains at “1.02 thousand” irrespective of how much/what light source I use. Please do help me with clearing this out!

Shreyas KN


Can you do one thing?

Visit https://cloud.boltiot.com/api > Under API request builder, choose analogRead > Choose pin A0 > Click Build API request > Make same hardware configurations > Make similar lighting near the LDR > Click Test API.

Let me know what is the value you see beside ‘value:’ key.

Hello @akshayan.sinha!

I tried that, and got the following result when I clicked on Test API :

Just one more doubt. Won’t these values be the same? Like whatever the device would give, the same values should come during the API calls as well right?


Yes. I doubted earlier, whether the data collection rate was bothering the value you receive depending on when you change the lighting conditions.

Can you show the connection you have made? Take a snap of the hardware configuration and send it here?


Just an update : I switched off the lights to the room completely and got values in the range of 300-400.

Right, your product is working fine then. The 300-400 could be present because of your Bolt’s Green and Blue Light.

You can see in the GIF, the value will always return to 1024 when there are photons detected by the LDR.


I totally didn’t account for the LEDs light :stuck_out_tongue:

Thank you for helping me out! :slight_smile: