Problem in light intensity sensor


#1

I am unable to retrieve data in the cloud in my first iot project of light intensity sensor it shows this message “Please check your product code at line 1, character 1
Uncaught SyntaxError: Invalid regular expression flags”


#2

@gulshanmishra02 Can you please share a screenshot of the error and the code that you have written?


#3

@gulshanmishra02 Go to the Bolt cloud page, check your code written after selecting your product!!


setChartLibrary("google-chart");
setChartTitle('Gauge Chart');
setChartType('gauge');
setAxisName('light_data');
setDimensions(400, 400);
setMaxValue(1023);

setGreen(250, 500);
setYellow(501, 725);
setRed(726, 1023);
plotChart('light_intensity');

This code might be helpful!!


#5

change plotChart('light_intensity'); to plotChart('light');(or whatever value you have given in A0 pin in hardware section)