New to Imp and needing help with getting temp readings to Xively

I’m new to the electric imp and I need help. I would like to take a temperature reading with a TMP36 temp sensor and get the data to stream to Xively. I’m new to writing code and if someone can help me with the basic setup I think I can customize it from there. Thanks in advance.

Here is how I do that


I got the device code to work just fine but I’m still having trouble with the agent code. Here is my agent code (I’ve replaced feed id and api key with my actual settings though):


function addXively(csv)
local req = http.put(“” + XIVELY_FEED_ID + “.csv”, {“X-ApiKey”:XIVELY_API_KEY, “Content-Type”:“text/csv”, “User-Agent”:“Xively-Imp-Lib/1.0”}, csv);
local res = req.sendsync();

addXively("Temperature," + avgTemperature);

if(res.statuscode != 200)
    server.log("error sending message: "+res.body);
  server.log("Xively updated");


got mine working with the bearded-one :slight_smile:

Also worth noting that we have an instructable specifically about sending temperature data to Xively :slight_smile:

Great instructable, but the link is dodgy so you need to cut/paste it into the browser

@DrJack link now fixed… thanks :slight_smile: