How would I go about interfacing Arduino with an html web page? Clicking buttons on a web page should trigger the Arduino to execute specified actions. Can someone help me with this problem?
How would I go about interfacing Arduino with an html web page?
Well, the first thing you need is an Ethernet shield. Got one of them?
Clicking buttons on a web page should trigger the Arduino to execute specified actions.
A button on a web page is typically part of a form. Clicking the button typically (but not always) triggers the SUBMIT action for the form.
In the SUBMIT section, you define what happens. Typically, the status of all fields on the form are returned to the server in the form of "name=value" pairs. It is up to you to parse the input to the Arduino/Ethernet shield, to determine if the request is to display the form or to process the already displayed form's data.
We'd need to know what hardware you have, and what experience you have with HTML and forms, in order to provide any real guidance.
Check the below link.
PaulS:
How would I go about interfacing Arduino with an html web page?
Well, the first thing you need is an Ethernet shield. Got one of them?
Not necessarily. Unless the Arduino is capable of running a micro web-server, in which case, you could do it that way, but parsing HTTP GET/PUT requests is probably not something you want to do in your sketch. (Or does the ethernet shield implement a webserver, with built-in Arduino control functions?)
What you do need is a webserver of some sort, somewhere. For example, I run Apache on my local machine. So, assuming the Arduino can accept serial input via USB or RS232, I can write PHP to open the USB device on my computer to which the Arduino is connected, and send commands to it that way. Not sure that's the best approach, it's just what comes to mind.
How you develop your web application is up to you. One possibility would be to use AJAX, which would make it easier, I think, to have multiple buttons performing multiple functions. (This is entirely possible with HTML forms and the GET/PUT methods, but AJAX will do it without refreshing the entire page each time you submit.)