Hi, I’m using this link (https://canvasjs.com/javascript-charts/dynamic-live-multi-series-chart/) as my reference to plot a graph in a webserver. In this code there is a line that I want to adjust according to my need.
// pushing the new values dataPoints1.push({ x: time.getTime(), y: yValue1 });
in this code, I want to change the yValue1 into a variable that I stored my sensor data called ‘Temperature’.
How can I apply this HTML code into Arduino IDE?
Below is the way I did, is it correct?
client.println("dataPoints1.push( { x: time.getTime() , y: temperature }); } ");
1 Answers
Hello, you would need to do something like this:
String your_yValue1_variable = "your_value";
client.println("dataPoints1.push( { x: time.getTime() , y: ");
client.println(your_yValue1_variable);
client.println("}); } ");
Basically, you just need to do a client.println() with your desired variable. I hope that helps!