singleButton({name:“Led On”, action:“digitalWrite”,
pin:“0”, value:“HIGH”,bgcolor:“green”,
shape:“rectangle”,align:“left”,“text_color”:“white” })
singleButton({name:“Led Off”, action:“digitalWrite”,
pin:“0”, value:“LOW”, bgcolor:“red”,
shape:“rectangle”, align:“left”, text_color:“black”})
singleButton({name:“Fan On”, action:“analogWrite”,
pin:“0”, value:“230”,bgcolor:“#ffa500”,
shape:“circle”, align:“right”,“text_color”:“white” })
singleButton({name:“Fan Off”, action:“analogWrite”,
pin:“0”, value:“0”,bgcolor:“#6a5acd”,
shape:“circle”, align:“right”, text_color:“white”})
setChartLibrary(‘google-chart’);
setChartType(‘line graph’);
plotChart(“time_stamp”,“light”);
in both this code i get same error , and in this code when i change the line graph to bar chart or else it’s not working.
Hi @soumyamaharana8888 There is a syntax error in each of the function calls. The issue lies with the placement of the quotation marks around the property names in the object. The quotation marks should only enclose the property values, not the property names.
By removing the quotation marks around the property names, the code should now be valid.
singleButton({name:“Led On”, action:“digitalWrite”,
pin:“0”, value:“HIGH”})
singleButton({name:“Led Off”, action:“digitalWrite”,
pin:“0”, value:“LOW”})
I’m facing the same error in this code.
Hi @soumyamaharana8888 ,
Can you please share your code and other relevant screenshots so that we can look into the issue you are facing.
getting the same error but everything is working fine
Code:-
plotChart(‘time_stamp’,‘light’);
facing the same issue do you resolved this issue?
no but i dont think that it is a code related error else it would have not worked so its fine