Hello, so I have been tinkering with an LCD screen for a while planning to have all my data update and displayed in real time so that I may check it whenever I please and move on with my life. Then, a touch of brilliance (not really), I decided to go w/ an Ethernet Shield and just display all my data on the "Internet" so that I may connect wherever I like. The issue I am running into is real time updates. Is this even possible with HTML code? I attempted a simple test where I would increment the int i and then write it to my web page. However, instead of clearing the data that is already there (like the LCD screen would because of new pixel declaration) it just stacks the data on top and eventually freaks out. I see the issue in HTML were it just sits there and starts throwing out new HTML code w/o ever deleting the previous. Do I need to be using Java, Scripting, CSS, or something in order to make real time updates? How do I clear the previous? How do I update in Real-Time? In the words of the great JarJar Binks, "Any help here would be hot."
Is this even possible with HTML code?
First question: Is the Arduino a client or a server? If it's a server, it can not push data as it changes. It can only respond to GET requests. The response can include Meta tags that cause the client to ask again after the specified interval.
Do you have the webpage on the Arduino, or a webpage on the internet and want to update that with the Arduino ? It makes a big difference.
Running webpage on Arduino
Live updates are possible with HTML5 and canvas.
But you have to be an HTML5 expert to get that working (and I'm not).
"Ye olde" solution is to make the HTML page update itself every second or every few second. Each update in the browser will retrieve new values from the Arduino.
Running webpage elsewhere
Using PHP with that webpage and the Arduino to send data: it should perhaps be possible. But also in this situation, HTML5 and canvas is the most beautiful solution.
Ah, that sucks. The Arduino is the server since it's doing the tests. I was hoping to throw the data onto a webpage and be able to view it from my PC. But you're saying no way to update it in Real-Time?
But you're saying no way to update it in Real-Time?
Do you see any other web sites doing that? If so, that would be a good place to look and see how they did it. It is certainly not the norm.
What kind of "real-time" data are you talking about?
Do you see any other web sites doing that? If so, that would be a good place to look and see how they did it. It is certainly not the norm.
Yes, I have. You can go to a website and watch some sort of timer count down till something. I've seen those all over the place. Or, when a switch if flipped somewhere, an LED will suddenly come on on the webpage you're looking at.
What kind of "real-time" data are you talking about?
I am cycling power at 1.5 mins ON and 2.0 mins OFF. I want to display On/OFF when they occur while also display at what second the cycle is within it's current status. 55 secs ON...56 Secs ON...57 Secs ON....so forth. Runs for 50k cycles...so also displaying at what cycle the Arduino is currently at.
You can go to a website and watch some sort of timer count down till something.
How fast? If the refresh interval is one second, then it is likely that the client made a new GET request, without you knowing it.
It is also possible that the client is executing some code that does the countdown, rather than a server.
Or, when a switch if flipped somewhere, an LED will suddenly come on on the webpage you're looking at.
This really seems more like another GET request was issued because the Meta tag refresh was defined, and the interval expired.
I agree with PaulS.
Can you give a few links to webpages like that ?