This is how to push high resolution real-time data from Arduino-based temperature sensor to your web page without any server-side coding.

Arduino is a great device for collecting, storing and transferring data from various sensors but there are times you need to make your data accessible from any place over the internet, like I did for room temperature in my study.
That’s when this solution may come handy.
The solution utilises a cloud-based real time web publishing tool Partcl.com that allows you to publish any data with about 0.1 second latency.
First you will need:

- Temperature sensor TMP102 on sparkfun breakout board
 Arduino Ethernet (which is in fact is Arduino + Ethernet Shield)
- wires
- ethernet cable
-power adaptor for Arduino
- Free account on Partcl.com (when registered you will get your publishing and web keys which you will put into Arduino code and in http code on your website)

Step 1: Connect the Sensor As Shown on the Picture.

Connect the sensor as shown on the picture.

Image is taken from incredibly good blog http://bildr.org

I often use it as a reference

Step 2: Register on Partcl.com

Register on Partcl.com. 
After registration you will get a publishing key and a web key.  You will need them for the next steps.

Step 3: Upload the Arduino Code

Upload the Arduino code
Substitute Bold fields with the following information:
-Mac address of your board
-IP of the board in your network. If you have DHCP and can not specify a fixed IP address, you will need another library and slightly different code.
I will be more then happy to provide any additional instructions if needed.

#include <SPI.h>
#include <Ethernet.h>
#include <Wire.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {0x??, 0x??, 0x??, 0x??, 0x??, 0x??}; //Mac Address of Arduino Ethernet Shield or Ethernet Board
byte ip[] = {???,???,???, ???};  // IP address of the Arduino 
byte server[] = {67, 202, 35, 165}; // Partcl.com

int tmp102Address = 0x48;

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):

Client client(server, 80);

void setup() {
// start the Ethernet connection:
Ethernet.begin(mac, ip);
// start the serial library:

// give the Ethernet shield a second to initialize:


void loop()
byte MSB = Wire.receive();
byte LSB = Wire.receive();
int TemperatureSum = ((MSB << 8) | LSB) >> 4; //it's a 12bit int,
using two's compliment for negative
float celsius = TemperatureSum*0.0625;

if (client.connect()) {
   client.print(celsius, 2);
   client.print(" HTTP/1.1\r\n");
   client.print("Host: partcl.com\r\n");
   client.print("User-Agent: Arduino For Teh Win!\r\n");
   client.print("Accept: text/html\r\n");
   client.println("Connection: close\r\n");

Step 4: Create the Web Page

Create the following html page:
(DO NOT FORGET to substitute "ENTER_YOUR_WEB_KEY_HERE" with a real WEB KEY from your partcl.com home page)
<!DOCTYPE html>
        <script id="partcl_client_script" web_key="ENTER_YOUR_WEB_KEY_HERE" src="http://partcl.com/partcl.full.js"></script>
        <partcl cell_id="temp_test"></partcl>
        <pchart cell_id="temp_test"></pchart>

DO NOT FORGET to substitute "ENTER_YOUR_WEB_KEY_HERE" with a real WEB KEY from your partcl.com home page.
Later, instead of cell_id="temp_test" you may want to use any other name, just make sure you substituted the cell id in your controller code as well (it is located after the publishing key).
Both <partcl> and <pchart> tags have plenty of properties for "fine tuning". Please do not hesitate to ask if you are interested.
A number of functions, properties and methods in partcl API is growing so rapidly, that we just have no time to update the documentation in time ))

Instead of Arduino you may use a different connection technology. The main trick is to create a sensor system that will send HTTP GET requests to partcl.com.

<p>Could i swap the temp sensor for a wheatstone bridge as its still just outputting a series of signals? also doing this wirelessly </p>
<p>partcl.com doesn't exist anymore. If there are no other sites like that, this tutorial is outdated and should be removed or updates.</p>
<p>Agree, also the code doesn't measure negative temperatures.</p>
<p>what about partcl.com it gives error if any other site is their let me know about it .</p>
<p>Helloo can u please do this for an arduino wifi shield ? thank u</p>
Can you change this to accommodate multiple sensors? That would be ideal for my reptiles
OLD <br>Serial.println(celsius,2); <br>if (client.connect()) { <br> client.print(&quot;GET <br>/publish?publish_key=ENTER_YOUR_PUBLISHING_KEY_HERE&amp;id=temp_test&amp;value=&quot;); <br> client.print(celsius, 2); <br> client.print(&quot; HTTP/1.1\r\n&quot;); <br> client.print(&quot;Host: partcl.com\r\n&quot;); <br> client.print(&quot;User-Agent: Arduino For Teh Win!\r\n&quot;); <br> client.print(&quot;Accept: text/html\r\n&quot;); <br> client.println(&quot;Connection: close\r\n&quot;); <br> client.println(); <br> delay(300); <br>NEW <br>Serial.println(celsius,2); <br>if (client.connect()) { <br> client.print(&quot;GET /publish?publish_key=ENTER_YOUR_PUBLISHING_KEY_HERE&amp;id=temp_test&amp;value=&quot;); <br> client.print(celsius, 2); <br> client.println(&quot; HTTP/1.0&quot;); <br> client.println(&quot;Host: partcl.com&quot;); <br> client.println(); <br> delay(300);
Is this tutorial still working? I have a arduino Ethernet board and Arduino IDE 1.0 installed. I have created the web page with the html code in the tutorial above. I have a Partcl account. I have entered the web key and the publishing key in both the arduino code and html code. My problem is that the web page is blank, no temperature appear on my site. Is there a problem with this tutorial or is it just me that is 'stupid'?
Anyway I would like to use temp sensor what can be go above 85 Celsius..upper limit can be 120-125 Celsius. What can I use? TMP112 is not reachable here in Hungary umfortunately. <br>Does POE has a limit of the lenght of the CAT5 cable usage? <br>Many thanks!
Hi, <br> <br>Does the system still working fine? I would like to create this to monitor an air heating solar system. Should I start to order the parts?:):)
Thanks apasiechnikov for the details!<br> <br> You said: &quot;If you have DHCP and can not specify a fixed IP address, you will need another library and slightly different code. I will be more then happy to provide any additional instructions if needed.&quot;<br> <br> I do have DHCP and would like the details. I'm not up to speed on interfacing Arduino to the internet, so that would be quite helpful. Also, can you tell me if it's possible to add this data to my dyndns.org web page where I have my Foscam IP camera displayed or is that a totally different animal. If it's possible, I would appreciate it if you could point me in the right direction, so I can proceed to figure it out!<br> <br> Thanks!
Hi there. <br>Sorry for the delay,<br>For the second question, yes it will work everywhare.<br>The first question:<br>below it is a &quot;modern solution&quot;<br>You have to upgrage your Arduino IDE to 1.0 and then the code should read:<br>(minor changes)<br>It will deal with DHCP<br><br><br>#include <br>#include <br>#include <br><br>// Enter a MAC address and IP address for your controller below.<br>byte mac[] = {0x??, 0x??, 0x??, 0x??, 0x??, 0x??}; //Mac Address of Arduino Ethernet Shield or Ethernet Board<br>char serverName[] = &quot;www.partcl.com&quot;;<br><br>int tmp102Address = 0x48;<br><br>// Initialize the Ethernet client library<br>// with the IP address and port of the server<br>// that you want to connect to (port 80 is default for HTTP):<br><br>EthernetClient client;<br><br>void setup() {<br><br>// start the serial library:<br>Serial.begin(9600);<br><br>SPI.begin();<br>Wire.begin();<br><br>// start the Ethernet connection:<br>if (Ethernet.begin(mac) == 0) {<br> Serial.println(&quot;Failed to configure Ethernet using DHCP&quot;);<br> while(true);<br> }<br> delay(1000);<br>Serial.println(&quot;connecting...&quot;);<br>}<br><br>void loop()<br>{<br>Wire.requestFrom(tmp102Address,2);<br>byte MSB = Wire.receive();<br>byte LSB = Wire.receive();<br>int TemperatureSum = ((MSB &lt;&lt; 8) | LSB) &gt;&gt; 4; //it's a 12bit int,<br>using two's compliment for negative<br>float celsius = TemperatureSum*0.0625;<br><br><br>Serial.println(celsius,2);<br>if (client.connect(serverName, 80)) {<br> client.print(&quot;GET<br>/publish?publish_key=ENTER_YOUR_PUBLISHING_KEY_HERE&amp;id=temp_test&amp;value=&quot;);<br> client.print(celsius, 2);<br> client.print(&quot; HTTP/1.1\r\n&quot;);<br> client.print(&quot;Host: partcl.com\r\n&quot;);<br> client.print(&quot;User-Agent: Arduino For Teh Win!\r\n&quot;);<br> client.print(&quot;Accept: text/html\r\n&quot;);<br> client.println(&quot;Connection: close\r\n&quot;);<br> client.println();<br> delay(300);<br>}<br>client.stop();<br>}<br>
Thanks for the reply.<br><br>You said I would need another library, but the above code shows no library , only the #. Did you forget to add them?<br><br>Thanks<br><br>
<br>Sorry, I think it was some parsing trick here ))<br>in IDE 1.0 Ethernet library deals with DHCP<br>so oinclude the same libraries as in step 3<br>
Good Jobs.<br><br>About Temperature sensor TMP102,Whether it can replace by DS18B20?<br>Thanks.<br><br>net0040@gmail.com
Thank you. Sure it can be. Please refer to www.arduino.cc/playground/Learning/OneWire for hints.<br>Kind regards
I have a similar set-up, just that I use LM35 and python to update my page, you can see it here: http://ardmon.leskos.netne.net

About This Instructable




More by apasiechnikov:Real-time web control for light decorations (no server side coding) Real-time room temperature on your Website (no javascript or server side coding) 
Add instructable to: