Using Ethernet W5100

Hello Everyone,

I’m building a project where I can control a Jacuzzi by a webpage.
I have xampp for simulating Apache and PHP server on my computer.

I’ve built a page named index.html, where I Have some buttons to send information to the board. How can I make Arduino use this page?

Page Code:

Unirp - Centro Universitário de Rio Preto

Centro Universitario de Rio Preto

Gerenciamento de Volume e Temperatura da Banheira

Pressione o Botão para encher na temperatura desejada

I have configured sucessfully a WebServer with arduino, but I want to make this page, the “control page” of it.

Thanks.

http://forum.arduino.cc/index.php/topic,148850.msg1118324.html#post_codetags

Below is your web page code bundled up and put inside the F() macro to save memory space.

//double quote " in html replaced with a single quote' to prevent compile error
//html lines consolidated and put inside F() macro to save memory space

client.print(F("<html><head><meta http-equiv='Content-Language' content='pt-br'>"
"<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>"
"<title>Unirp - Centro Universitário de Rio Preto</title></head><body>"
"<div align='center'><h1>Centro Universitario de Rio Preto</h1>"
"<h2>Gerenciamento de Volume e Temperatura da Banheira</h2></div>"
"<div align='center'><h4> Pressione o Botão para encher na temperatura desejada</h4>"
"<table border='0' width='50%' cellpadding='2'><tr></tr><tr><td>"
"<!--Botão Temperatura Fria--><form method='POST' action='arduino.php'>"
"<p align='center'><input type='hidden' value='fria' name='tempD' >"
"<input type='submit' value='Água Fria' name='fria'></p></form>"
"<!--Botão Temperatura Morna--><form method='POST' action='arduino.php'>"
"<p align='center'><input type='hidden' value='morna' name='tempD' >"
"<input type='submit' value='Água Morna' name='morna'></p></form>"
"<!--Botão Temperatura Quente--><form method='POST' action='arduino.php'>"
"<p align='center'><input type='hidden' value='quente' name='tempD' >"
"<input type='submit' value='Água Quente' name='quente'></p></form></form>"
"<div align='center'></div></tr></table></div></body></html>"));

I’m not sure I follow… Is the web page source code you posted supposed to be hosted on the Apache web server, or on the Arduino?

If you put it on the server, you’ll need a PHP script to read the form input and communicate with the Arduino. That PC-to-Arduino communication can be done in many ways.

If you host it on the Arduino itself, you’re going to have to parse HTML POST data and look for the field names you created with the INPUT tags.

There are plenty of examples online of either reading form data via the Arduino, or how to write PHP scripts, so you’re not likely to have anyone volunteer to re-write that code for you here. But, if you’re having trouble getting something to work, post the code you’re using, and the problem you’re having.