First LDR project related

Despite all correct circuit connection and correct code
the data reading is showing NaN…
what can be done for this , please guide?


try again go to configure this project icon take a code save it make sure your hardware connection is all done . deploy configratution

Hey, there can be many reasons for the data reading to be NaN.

  1. The cloud may not be collecting any data due to the faulty connections. Double check your connections.
  2. You might have mistakenly written wrong code.
  3. You might have forgotten to save the code and hardware configurations. If so, go back to the configuring part, save it and deploy the configuration.
  4. There is a possibility the one of the circuit components is not working as expected.

It shows NaN because bolt module unable to fetch data from sensor or device may have no internet connection or the pin number which is connected to sensor ( A0 ) is written wrong in code or may be you used wrong function analogWrite instead of analogRead.
if all the above things are right the check again with replacing sensor.

Hello @praveenprakash448
The problem you are facing might be because of poor network connection.
Try saving it again and then deploy it to the cloud.

Also try going through the trouble shooting of the project.
Hope you resolved Your problem.

Hey @praveenprakash448 the reason behind this problem is that your bolt module is
1.unable to fetch data from sensor connected to sensor is written wrong in code should be A0
3.Function used may be wrong might have used analogwrite instead of analogRead.
5.most basic may be your bolt module is not connected to internet.
6.make sure the code is completely written
7.make sure you have used the same variable name in the code that you have creates in the variable name section.

If everything from above is correct then try replacing the sensor.
i hope it helps.

Hello @praveenprakash448
Firstly, make sure when you create the product then you select your Bolt as a " Input devices".
Then check all the hardware connections and product code. After that save the code and press “Deploy Configuration” button and view the result.

Hey @praveenprakash448,
. This means that there is an error in the code that you have written.
. Make sure that the variable name that you have used in the code matches exactly to the variable name provided while creating hardware configuration.
. If that’s the case, copy the variable name from the hardware config page and paste it in the code.
.Save the code and click on deploy configuration.

Please check your jumper wire they are working properly or not if they are working properly please connect the pin to the A0and first of all save the code while you have choose the pin is A0 then deploy the code

Hi @praveenprakash448

Is your issue resolved?

Do let me know in case you need further assistance.

Thank you so much for helping me a lot…
My issue has been resolved…
I learnt alot with my mistake.

1 Like