Of course the obvious thing to do is add some more interesting input and output devices, most of which could be as simple as plugging in a different Arduino module.
You could do a lot more interesting things by changing the sketch. Notice how the Arduino uses query parameters to change the outputs:
http://172.16.4.119/?21 activates this line: if(parms=="21"){outs[0]=1;}
So you can add extra commands by adding extra ‘if’ statements here. For example:
if(parms=="debug"){Serial.println(“Debug”);}
will print ‘Debug’ on the serial monitor if the page http://172.16.4.119/?is accessed.
At the moment though, these commands will be hidden, because there isn’t a link for them.
To add a link to the page that is served up, you need to add the following to the section that ‘prints’ out the web page to the browser:
client.print("<a href=\"");
client.print(fname);
client.print("?debug\">debug</a><br>");
Note that the first ‘debug’ is the name of the command used in the ‘if’ statement above, while the second ‘debug’ is what appears as the link on the screen.
Of course you could add a library which reads a non-analog sensor (eg a digital humidity sensor) and display it to the web page as well- or even get the Arduino to process the sensor inputs and automatically control the outputs, as well as allowing remote control from the web interface.
Another option could be to use an Arduino as a web client (eg Files>Examples>Ethernet>WebClient), and get it to trigger the commands and read back the data. That gives the option of manual or automatic control.
We’re looking at getting a Wifi shield soon, so look out for a Wifi version of this project too.
This is a useful link if you want to understand the HTML generated by the Arduino:
http://www.simplehtmlguide.com/cheatsheet.php
Here is a typical sample of the HTML generated by the sketch:
<h1>ARDUINO IO CONTROL</h1>
<h3>Digital 2 is ON <a href="?20">[OFF]</a><a href="?21">[ON]</a><br>
Digital 3 is OFF <a href="?30">[OFF]</a><a href="?31">[ON]</a><br>
Digital 4 is OFF <a href="?40">[OFF]</a><a href="?41">[ON]</a><br>
Digital 5 is ON <a href="?50">[OFF]</a><a href="?51">[ON]</a><br>
Digital 6 is OFF <a href="?60">[OFF]</a><a href="?61">[ON]</a><br>
Digital 7 is OFF <a href="?70">[OFF]</a><a href="?71">[ON]</a><br>
<br>Analog 0: 516
<br>Analog 1: 391
<br>Analog 2: 315
<br>Analog 3: 264
<br>Analog 4: 227
<br>Analog 5: 244
<br><a href="raw.htm">Raw Data</a>
<br><a href="temp.htm">Temperature Data</a>