How to convert LM35 reading to deg C in a variable and assign to plotchart function

I put the LM35 temp sensor into the bolt module. I created a Product in my Bolt Account. In the code I use “plotchart(‘time_stamp’,‘temp’)”. I gotten 539 in the readings. I like to convert the value to deg C.

How do I create a variable to convert the sensor reading to deg C and then put this variable into plotchart function?

hi, @chenkhoon
If you want to convert raw value to degree C then just add following line to your code you will get your desired output.
code:- mul(0.0977);
still if have any doubt feel free to ask…
thank you!

Thank you Akhil for the fast response.
Somehow my output is 500+ which convert to 50.* deg C, which should not be correct. Singapore temp about 30 deg C.

welcome, @chenkhoon
simply switch off bolt module for a 10-15 sec. then restart it and then check the readings.

Thank. My observation from the temperature I got from the pack. As temperature is goes down the output went up and vice versa.

  • In my living room without aircon, the reading is about 519
  • in mmy bedroom with aircon, the reading increase to 528
  • In my fridge, the reading further increase to 538
  • in the freezer, the reading increase to 567

From the above maybe I can conclude that the sensor I bought from Bolt IOT is not LM35.

Please help comment. Best if you can provide me the conversion formula to degree C.

Thank you…

Hi @chenkhoon,

The issue you are mentioned happens commonly when the connections of the sensor to the Bolt WiFi module are loose. The output randomply settles in the range of 500 and 600.

Please check the connections once more. If the connections are fine, then your LM35 is probably faulty. If you purchased the kit in the last 1 year, you will be eligible to have the sensor replaced from Bolt IoT at no cost.