Web Page with Ethernet Shields

Hi,

I have a couple of ethernet shields collecting data on temperature etc. around the home.

I would like to view the data from both shields in a single page in my web browser so I guess this is an html question.

How do I get my html script to look at each shield in turn , collect the data and display it?

Thanks for any help.

How do I get my html script to look at each shield in turn , collect the data and display it?

The simplest way is using frames. Each frame can display data from a different source.

Just because the question is hard (to you) is not a reason to put it in the hardware section. This is a software question.

Gah! No! Stop!

We do not use frames. This is not 1997.

One way is to display everything at once, the other is to display each dataset one at a time.

All at once: Use tables to display the data in tabular form. Use Ajax to update the display of the content — if you use a javascript framework that has automagic updating (Prototype has Ajax.PeriodicalUpdater and Jquery has something similar). (Or investigate HTTP Comet techniques to push data to the table content so that the page can be updated over XMLHttpRequest — I've never done that myself so I don't know much about it).

One at a time: Use divs to display a single table per dataset, all overlaid one on top of the other, all with a display attribute value of “none”. Write a sequencer in javascript, have it toggle the attribute value of each of those divs in the DOM to “block”, one at a time. That way it gives you a sort of “slide show”/

Sorry for putting it in the Hardware section.

Ian, thank you for your help, I've never used Ajax before so may be back with more questions.

Tony

If you use frames I think you can make the page in the frame metta refresh to keep the data in the frame updating.

@Ian
Could you provide a good AJAX tutorial? (optionally via PM)

As Rob says, some tutorial would be of help as so far I have been unable to make any progress. Does any one know of a tutorial close to my requirements?

You could try looking at Pachube http://www.pachube.co

Below is a simple frame test setup where a link is clicked (like VER, VA, etc) and the desired data is displayed in a box. You can copy the below code, paste in notepad, save as test.htm, then double click to launch. I made this for another microntroller setup, but it should work with an arduino web server supplying the data.

<HTML>
<HEAD>
<TITLE>Zoomkat's cgi test</TITLE>
</HEAD>
Zoomkat's SSC-32 cgi test 2/28/10




Get data from SSC-32:



|<a href="http://zoomkat.no-ip.com:88/cgi-bin/cgi1.bat?hello" target="DataBox" 

title="'SSC-32 version'">VER</a>|

<a href="http://web.comporium.net/~shb/arduino.txt" target="DataBox" title="'Voltage on A 

analog input'">VA</a>|

<a href="http://zoomkat.no-ip.com:88/cgi-bin/cgi1.bat?hello" target="DataBox" 

title="'Voltage on B analog input'">VB</a>|

<a href="http://web.comporium.net/~shb/arduino.txt" target="DataBox" title="'Voltage on C 

analog input'">VC</a>|

<a href="http://zoomkat.no-ip.com:88/cgi-bin/cgi1.bat?hello" target="DataBox" 

title="'Voltage on D analog input'">VD</a>|

<a href="http://www.yourhtmlsource.com/examples/inlineframes3.html" target="DataBox" 

title="'Someone set us up the bomb'">Q</a>|

<a href="http://www.yourhtmlsource.com/examples/inlineframes3.html" target="DataBox" 

title="'Someone set us up the bomb'">VB</a>|

<a href="http://www.yourhtmlsource.com/examples/inlineframes3.html" target="DataBox" 

title="'Someone set us up the bomb'">VC</a>|


 
<iframe src="http://zoomkat.no-ip.com:88/cgi-bin/cgi1.bat?hello" width="30%" height="100" 

name="DataBox">
</iframe>



</HTML>