This page is browser friendly, by the way. Make your browser's window less wide than your whole screen and you will find the narrower columns much easier to read. For more tips, see my Power Browsing hints.
I strongly recommend that you at least skim through the information on my page about how this code was developed, but if you want just "the answer", here it is. At least here is the Arduino half of things. You use an ordinary web browser, e.g. Firefox, for the client. You can access an ArduServer over your LAN or across the internet.
A "W5100" is the chip at the heart of widely available ethernet interfaces for Arduinos. It is the chip in the Arduino + Ethernet devices like the Sparkfun Ethernet Pro, and the Freetronics EtherTen. (You can, of course, use an ordinary Arduino, or clone, and connect it to a separate board with the W5100 and associated electronics, either as a shield, or by individual wires.)
You will have to change one line if you don't want to use port 80.
You will have to change the several lines with my URL (http://mon7nc...) if you want access across the internet. (Change the URL from my URL to your URL.)
You'll need to alter the LAN address line, if you haven't put your ArduServer on 192.168.0.240.
You may to change the line which set's the device's MAC. (You can use any number that isn't already used by something else on your LAN.)
If your LED is not on D5, and your phototransistor on A1, there will be other simple, single-line changes to make.
Other than that, it should Just Work... if your interface is the W5100. If you don't know, you may well have a W5100.
I have produced a simple shield for Arduinos with the components necessary for the phototransistor monitored LED, temperature sensing, and an ambient light sensor.
I m working on getting that information online for you... but you will have to make your own! Even if you don't elect to make the PCB, the circuit diagram may be of use.
I have a Windows program which can run in an internet connected computer anywhere in the world, and keep an eye on the temperature where the ArduServer2 is. If the temperature falls below a level of your choosing, an alarm goes off.... the PC begins beeping. This is up and running, but not yet in a version for selling. If you want me to get the commercial version launched, write and say so, I'll see if I can get to it!
It may be a bad idea to use any of the following at the same time as some W5100 based shields. If the shield has other funtions, e.g. SD card reader, there may be other lines in use in connection with that. Happily, with a Pro Ethernet (Sparkfun), it seems that you only need to avoid D10-D13....
... and D13, but this last one only if you "care" that on the shield it goes to an LED, and from there through a resistor to ground. (This merely parallels the same thing on many Arduino and clone boards... BUT, to digress from the digression, BE AWARE that the software behind "setup()" and "loop()" pulse D13 high briefly before executing whatever you specified in "setup()".)
Of course, I unwittingly used some of those lines in my designs. The designs SEEM to work, but it would be a good idea to take what I've put on those lines and move them elsewhere. I will gradually be revising my designs as follows....
In every case, to modify the software is easy... but you will need to look carefully to see whether what is currently online has been modified or not.
To change the line used for, say, the phototransistor watching the LED in, say, ArduServer2, the line....
client.print("<br>Analog input 0 reads: <b>"); client.print(analogRead(0));
... must be changed to...
client.print("<br>Analog input 1 reads: <b>"); client.print(analogRead(1));
... and you are done! (You'll have to move one wire on your breadboard, too, if you had it wired for the original design.)
(Digression: Is nothing every easy? In 99.0% of my code, such a change would merely have been a matter of changing something like the "const byte bLEDpin=8;" at the start of the program. But in this case, to avoid fighting with... not hard... getting the prompt to identify the channel, I took a shortcut and specified the channel explicitly instead of a global variable. Sigh.
Sorry! I could have done without this, too! When will the Official Arduino Site have proper documentation of the ethernet shield and library??
Remember: The code is explained for you at my page explaining the ArduServer2's creation.
And there's a separate page with help on the support hardware, including a PCB design for a suitable shield.)
Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org
CSS behind the page checked, at least once upon a time!, with http://jigsaw.w3.org/css-validator/
Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Also, I have some of my pages' traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try one, check out their site. Why do I mention the script? Be sure you know all you need to about spyware.
....... P a g e . . . E n d s .....