navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 25, 2012, 08:59:38 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: 1 2 [3]   Go Down
  Print  
Author Topic: Arduino serves its first "temperature"  (Read 5427 times)
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #30 on: December 21, 2008, 10:46:33 PM »

Paul,

I agree, this simple temperature server uses the GET method to re-serve the page when the button is pressed.

It's quite informative to look at the html source using your browser - something like this

Quote
<center><p><h1>Arduino Internet Thermometer  </h1></p> <hr><br><form METHOD=get action="http://91.111.101.240/"><h2> Thermistor reads </h2> <h1><font color="#0000FF"> + 17.91  &#176C</font></h1><br> <input type=hidden name=cmd value=1><input type=submit value="Get Temperature"></form>

Here you can see the form, METHOD=get and action="http://91.111.101.240/"  which basically appends the URL and gets the server to re-serve the page.

Lurking in there are the  17.91 characters which is the temperature data.

I've tried the Pachube example code but it has yet to serve me anything at all.  Perhaps the request to my server is not being received correctly or at all??

I am now smoothing 64 successive ADC readings and giving the average temperature.

Well Tomorrow's another day I suppose.


Ken



Logged
Paulh_Boats
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2768



« Reply #31 on: December 21, 2008, 11:09:36 PM »

Ken,

That form method returns html type data, which is what the webserver example does and returns the whole html page.

But I was using Javascript code like this in my local browser program:

function UpdateStatus()
{
  xmlHttp = GetXmlHttpObject(StateChanged);
  xmlHttp.open("GET", "http://91.111.101.240" , true);
  xmlHttp.send(null);
}

which is looking for xml content, but the webserver does not return xml content. It only returns http content:

("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n<h1>200 OK</h1>"));


However the simpleEEMLserver does return xml content in the HTTP header:

#define HTTP_HEADER "HTTP/1.0 200 OK\r\nServer: arduino\r\nContent-Type: application/xml\r\n\r\n"


GetXmlHttpObject() is used to combine xml data from remote websites in the background, rather than reloading the whole page. So one web page could get temperature data from 4 servers and display the data together, by calling GetXmlHttpObject() with each server's IP address.

Panchube could be calling GetXmlHttpObject() on all the remote servers to get their XML sensor data, not sure though.

Maybe you could ask on the Panchube forum if GetXmlHttpObject() can be/is used on the Arduino.

-Paul
« Last Edit: December 21, 2008, 11:18:31 PM by Paulh_Boats » Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #32 on: December 22, 2008, 12:01:17 AM »

Paul,

Thanks for the suggestion - I'll look at it in the morning.


Ken
Logged
wyleu
Guest
« Reply #33 on: December 27, 2008, 02:56:17 PM »

http://195.112.27.196:81/eeml/

A few more sensors for the system. It is data from live sensors but the data set is frozen intentionally at the moment.
That's the minimum, I'll see if I can fill a few more of the other fields...
« Last Edit: December 27, 2008, 02:59:31 PM by wyleu » Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #34 on: December 29, 2008, 11:00:15 AM »

Guys,

Over the break, I added a few more analogue sources to the Arduino, including a small solar panel taken from a solar garden lamp which then charges a super capacitor.  The solar panel output and the super capacitor voltage are displayed.  (The solar panel is currently placed on a NE facing window sill - so don't expect anything wonderful!)

My Pachube feed is here:

http://www.pachube.com/feeds/1257

One or two minor problems with Pachube,  it doesn't seem to be requesting data from the Arduino at regular time intervals - they seem somewhat random, often with long breaks between readings.  Secondly, the graphs produced on the site are lacking in any reference time or timescale - so that its hard to deduce when events happened.

I am sure that some of these minor shortfalls will be addressed as Pachube is developed further.



Ken
 


Logged
Pages: 1 2 [3]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!