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.
First, ensure all connections are correctly established, linking the module with the cloud. Then, proceed to configure the deployment code. If the system is not functioning, attempt to troubleshoot by creating a new product, ensuring adherence to instructions for proper setup.
Hiii there,
Your code is right but the problem is in the variable name, Variable name can only contain lowercase alphanumeric characters and underscores.
try this it should work
First, verify that all connections are properly established, enabling the module to communicate with the cloud. Next, configure the deployment code accordingly. If the system encounters any issues, try resolving them by initiating a troubleshooting process, which may involve creating a new product and ensuring that setup instructions are followed meticulously.
Here i can assist you properly
STEP 1: First setup the bolt environment properly with your mobile phone as it is given in the steps in BOLT IOT Training
STEP 2: setup bolt.cloud.com environment with adding device and with your bolt module name then create product there check your product configuration should be given as gpio and input device then in hardwarew configuration set pin a0 as light and go for code and then give code as
setChartLibrary('google-chart');
setChartTitle('Light Intensity Monitor');
setChartType('areaGraph');
setAxisName('Time','Light');
setCrosshair(true);
setAnimation(true);
plotChart("time_stamp","light");
And save code and deploy configuration before that check whether your product is linked with your bolt module And then give view this device option
##Happycoding
hello h.kanekar
the code you’ve entered is correct. however it seems that a couple more lines are required. try the following code out with the correct variable name.
setChartLibrary(‘google-chart’);
setChartType(‘lineGraph’);
plotChart(“time_stamp”,“light”);
hope it helps.