Introduction: Web Based Thermometer

Some years ago tombrew made TempBug, a web based Thermometer. He used an Electric Imp Card and a thermistor as sensor. I followed his instructions and for years I was able to monitor ambient temperature remotely. Recently the sites TempBug needed to work properly became unreachable and so I had to find a solution.

You need an Electric Imp account:

And a ThingSpeak account:

Both are free for basic tasks. Connect the TMP36 sensor, insert the USB cable and the Electric Imp card. Perform BlinkUp with your Android or iOS smartphone to connect the Imp to your WiFi network. As a last step you need to copy and paste the Agent and Device code in your impcentral Development Device Product:


local thingspeakUrl = ""; local headers = { "Content-Type": "application/x-www-form-urlencoded", "X-THINGSPEAKAPIKEY":"XXXXXXXXXXXXXXXX" };

local field = "field1";

function httpPostToThingspeak (data) { local request =, headers, data); local response = request.sendsync(); return response; }

device.on("updateTemp", function(temp) { local response = httpPostToThingspeak(field +"="+temp); server.log(response.body); });



function getTemp() { local supplyVoltage = hardware.voltage(); local voltage = supplyVoltage * / 65535.0;

local c = (voltage - 0.5) * 100 ; local c_str = format("%.01f", c); server.log("Current temp is "+c_str+" °C");

agent.send("updateTemp", c_str); }

imp.onidle(function() { getTemp(); server.sleepfor(30); });

Step 1:

Since spaces, returns and parentheses are important, you can check the way they should look by clicking on the above picture.

Step 2:

Here you can see what can be achieved after all the hard work...

Good Luck!

First Time Author Contest 2018

Participated in the
First Time Author Contest 2018