Thanks for providing the information for your excellent project!
]]>The part that talks to TS is very simple:
if (lastUpdate.Ticks < DateTime.Now.Subtract(new TimeSpan(0, 0, 300)).Ticks)
{
using (HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://api.thingspeak.com/update?key="+APIKey+"&field1=" + t.GetTemperatureFahrenheit().ToString()))
{
using (HttpWebResponse res = (HttpWebResponse)req.GetResponse())
{
using (StreamReader sr = new StreamReader(res.GetResponseStream()))
{
response = sr.ReadToEnd();
if (response != "")
{
lastUpdate = DateTime.Now;
}
}
}
}
}
If you need more than this, or any explanation, please feel free to let me know.
]]>