I'm working in a project to control a solenoidvalve for controlling an irrigation system. The problem is I want to control the solenoidvalve from an HTML stored in an SD card, and in spite of there are a lot of examples on the internet all of them are programmed putting the html code into the arduino code. In this way the "get" method doesn't work, and I think there's something that I have to do different to make it work.
The example I'm following right now is below:
And the code of my html is this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>index</title>
</head>
<body>
<form method="get">
<button value="true" name="valve" type="button">Abrir</button>
</form>
</body></html>
I forgot to say that the HTML webpage stored in the SD card loads correctly, but once I click on the button it doesn`t do anything. The serial monitor doesn't show any different word and keeps loading the webpage each 5 seconds, the time programmed in the loop.
SurferTim, unfortunately that's not the problem. I know how to change between buttons, checkboxes, submit buttons etc. The problem is I want to send the value with the client request, to use the get method which is the most common method for doing this as you can see in different examples, and when the webpage is stored in an SD card it doesn't work.