Why is my project not working?

I am not able to congifure.I tried twice.is my code wrong?

Hi @h.kanekar

Before plotting the graph, you have to set the chart library, chart type and chart title. Please try the below code and let us know if you still face any issue.

setChartLibrary('google-chart');
setChartTitle('Light Intensity Monitor');
setChartType('areaGraph');
setAxisName('Time','Light');
setCrosshair(true);
setAnimation(true);
plotChart("time_stamp","light");

I think this is your first project LDR, make sure your hardware connections are as per the instructions, please try again. I am sure it works.

Hi Hrishikesh,

I noticed your problem. It seems correct, but it’s essential to double-check your hardware connections.
Make sure the connections follow the sequence below:

  • 3.3v - LDR - A0 Pin | A0 Pin - 10k - GND
    or,
  • 3.3v - LDR - A0 Pin | A0 Pin - 330 - GND.

Warning: Also, ensure that the 3.3V and GND pins never touch each other. Provide a significant gap between them. If they get shorted, you’ll end up damaging the module.

There shouldn’t be any problem if it’s sorted correctly. You can try this code to get the result:

setChartLibrary('google-chart');
setChartTitle('Light Intensity Monitor');
setChartType('areaGraph');
setAxisName('Time','Light Intensity');
setCrosshair(true);
setAnimation(true);
plotChart("time_stamp","light"); 

Let me know the result.

Your code is correct . Have you saved the file? If not please save .
And then link your product to device .
After that Do “deploy configuration” to upload data to cloud.

Everything tried but nothing happend?

I tried everything but nothing happend

Hi @h.kanekar

Could you please elaborate more on the error you are facing? Please share screenshots or hardware connections so that we can rectify.

@h.kanekar
As per your screenshot, you have given the variable name as “Light”. Your code was correct as the variable name was matching.

However in the suggestions, the variable name was incorrectly provided as “light”. Please update your code to use the same variable name as you have typed in the hardware configuration. Click on save and then do push data.

You can open the “View device” option to check if the data collected by the device is displayed. If its its not displayed, click on the download data option and check if the data is shown in the downloaded CSV file.

Let me know if this suggestion helps to resolve the issue.