Robin2:
zhomeslice:
to make the page look pretty (The aggressive part)I wasn't commenting on your use of Ajax etc to update part of the browser page - that's a good idea. (If you have some spare time maybe you could teach it to the Arduino Forum developers :))
...R
this is off the subject of PWM reading and related to AJAX and arduino:
from my page code I posted earlier, you see this line. the web browser will be using the spot to put what my javascript/jquery code spits out.
client.println("
Place Holder
");
the following javascript would be loaded to the browser using:
client.println(""); // get javascript for my arduino
the website could be any website you can store files on. I own this domain but it could be located anywhere
so for the javascript:
$(function() { // jquery run this once the web page is loaded
setInterval(ReloadData(), 5000); // retrieves data from the arduino every 5 seconds
});
function ReloadData(){
$("#start")..load( "$data #Data" , function() { // this is all that is needed to load the data into the container using jquery
// we now have the page from the arduino and only snagged the code between <div id='Data'>......</div> and stores data in the in the <div id'start'>...</div>
// the data in each of the div elements is now accessible with simple jquery actions like:
// var x = $("#A1").text(); // this will store the Text based value for Analog sensor 1 into variable x for processing further with javascript
// additional processing of the page happens here. The Cool Aggressive stuff I have been mentioning
}
}
Enjoy