Temperature sensing device

How I get temperatures on graphs same like we done in LDR project

Plotting graph for LM35 temperature sensor is also similar. While creating the product, just create a variable and use the same to write a javascript code as you did for LDR project.

A sample code for your reference:
setChartLibrary(“google-chart”);
setChartType(“lineGraph”);#choose any graph that you want
setChartTitle(“Temperature Monitor”);
setAxisName(“Time”,“Temperature”);
mul(0.0977);#to convert the obtained reading to celsius scale
plotChart(“time_stamp”,“your_variable_here”);

Hope this helps!:smiley:

1 Like

first you need to connect temperature sensor with the BOLT IOT module then you need to check this code for the graph representation of temperature

setChartLibrary(‘google-chart’);
setChartTitle(‘Your Graph Title’);
setChartType(‘lineGraph’);
add(183);
mul(0.0977);
mul(1.8);
plotChart(‘time_stamp’,‘temperature’);

To plot graph for LM35sensor is same as ldr project .the difference here LM35 is three terminal device so we have just create a code in the javascript . the code is

setChartLibrary(‘google-chart’);
setChartTitle(‘Polynomial Regression’);
setChartType(‘predictionGraph’);
setAxisName(‘time_stamp’,‘temp’);
mul(0.0977);
plotChart(‘time_stamp’,‘temp’);

After hardware connection is done of LM35 link your product to Bolt cloud.
Then click on configuration after that click on code.
Give file name and save it by extention as .js

A sample code for your reference:
setChartLibrary(“google-chart”);
setChartType(“lineGraph”);#choose any graph that you want
setChartTitle(“Temp control”); #this is title of graph
setAxisName(“time”,“temperature”); #X-Axis Name’,'Y-axis Name
mul(0.0977);#to convert the obtained reading to Celsius scale
plotChart(“time_stamp”,“your_variable_here”);

Save the changes.
Run your python code click on deployment and then view the device push the data the graph will be drawn.