uhm so is there a way to solve my problem?
what i really want is to have somehow like a "webserver" who can send and receive data to my arduino.
what i mean is that. is there a way where i can make a simple UI with simple buttons to be displayed using a web browser where it can send and receive data from my arduino.
Have your Arduino remember the state of the buttons and write the HTML page out next time in such a way that it shows the buttons in their previous state.
uhmm does this apply to the webserver example of ethernet shield? .. can you show me simple codes to remember such states?
const int switchCount = 5; // Use your value hereint switchStates[switchCount];
thank you for the knowledge.. another problem for me, if i use a manual button like a push button to change the states of my arduino pins, and i include this for the update of the states, is there a way that my browser to get such updates? uhmm what i am thinking is that, is there like kind of "automatic refresh" feature so like for every 5 secs it would display the present states of my arduino?(if any manual buttons are used)
Yes, and no. There is NO way for a server to push information to a client. The client/server relationship is stateless. Once the server sends data to the client, it forgets that the client ever existed.The server can embed meta tags in the page that it serves that tell the client that it needs to refetch the page every n seconds. It is up to the client software to see those tags, and to act on them.The server, though, has no idea that a client request is a result of the user loading the page initially or the client refreshing the page.
A web server serves data. There is no way to make a server push data to a client. You wouldn't want google pushing data to you, would you?A web client pulls data. It can include, in the GET request, information that the server uses to tailor the returned data. That could mean that the server does something like turning a pin on or off, too.The server can tell the client, using meta tags, that it needs to check back later. That "check back later" part is a completely separate transaction, though.
i just want to ask if there is a "auto refresh" function for the web browser of your ethernet shield? like i want it to autoamatically refresh it every 5 secs..
<meta http-equiv="refresh" content="5">