Im doing a Smart Clock Project which requires a Web user interface.So i wanna ask the following questions:1.Do i need to have a fixed IP address for the Eternet shield?2.I have known that Arudino can be controlled by sending orders through internet, but how can i make a website-looking thingy which has buttons to control the Arduino?

I will really appreciate it if anyone can help me out here,if it is possible, could u also provide some links to the tutorials about that?

//zoomkat 7-03-12, combined client and server//simple button GET with iframe code//for use with IDE 1.0//open serial monitor and send an g to test client and//see what the arduino client/server receives//web page buttons make pin 5 high/low//use the ' in html instead of " to prevent having to escape the "//address will look like http://192.168.1.102:84 when submited//for use with W5100 based ethernet shields//note that the below bug fix may be required// http://code.google.com/p/arduino/issues/detail?id=605

pinMode(5, OUTPUT); //pin selected to control pinMode(6, OUTPUT); //pin selected to control pinMode(7, OUTPUT); //pin selected to control pinMode(8, OUTPUT); //pin selected to control

//pinMode(5, OUTPUT); //pin 5 selected to control Ethernet.begin(mac,ip,gateway,gateway,subnet); server.begin(); Serial.begin(9600); Serial.println("server/client 1.0 test 7/03/12"); // keep track of what is loaded Serial.println("Send an g in serial monitor to test client"); // what to do to test client}

No. You need one for the router that the Arduino with Ethernet shield is connected to. Your Arduino with Ethernet shield is local on that network, and the router (the internet facing device) needs to forward requests, for the port that the Arduino is listening to, to the Arduino.

Quote

2.I have known that Arudino can be controlled by sending orders through internet,but how can i make a website-looking thingy which has buttons to control the Arduino?

If you have to ask, I'd guess that the answer is that you can't.

There is nothing different in the HTML code that the Arduino serves up. It is generally a simple form with submit buttons whose action is to call the Arduino again. Google HTML Forms.

you mean the examples in the Arduino? ya, i did have a look at some of them, but now i wanna have tutorials that can help me understand how everything works so that i can fully understand it and make my own Web interface

//zoomkat 7-03-12, combined client and server//simple button GET with iframe code//for use with IDE 1.0//open serial monitor and send an g to test client and//see what the arduino client/server receives//web page buttons make pin 5 high/low//use the ' in html instead of " to prevent having to escape the "//address will look like http://192.168.1.102:84 when submited//for use with W5100 based ethernet shields//note that the below bug fix may be required// http://code.google.com/p/arduino/issues/detail?id=605

pinMode(5, OUTPUT); //pin selected to control pinMode(6, OUTPUT); //pin selected to control pinMode(7, OUTPUT); //pin selected to control pinMode(8, OUTPUT); //pin selected to control

//pinMode(5, OUTPUT); //pin 5 selected to control Ethernet.begin(mac,ip,gateway,gateway,subnet); server.begin(); Serial.begin(9600); Serial.println("server/client 1.0 test 7/03/12"); // keep track of what is loaded Serial.println("Send an g in serial monitor to test client"); // what to do to test client}

for me,the Eternet Shield im using not is missing the sticker with Mac address on it, What's worse,im living on Campus so i dont have my router but use the internet provided by Uni. In this situation, can i just use the Mac address and IP address .etc. given in your Sketch? or is there any way that i can figure out my own Mac address and IP address?

The MAC address must be unique on the network. You can try the address in zoomkat's code. It is likely to be unique.

The IP address is NOT. You must have a unique IP address in the range defined by your school. They are likely to be using DHCP to assign addresses to devices that connect to the network. The Arduino supports using DHCP to get an address.

for me,the Eternet Shield im using not is missing the sticker with Mac address on it, What's worse,im living on Campus so i dont have my router but use the internet provided by Uni. In this situation, can i just use the Mac address and IP address .etc. given in your Sketch? or is there any way that i can figure out my own Mac address and IP address?

Go to walmart and get a netgear 614 router for $25 so you can do your testing with/without the university network.

Google forum search: Use Google Search box in upper right side of this page. Why I like my 2005 Rio Yellow Honda S2000 https://www.youtube.com/watch?v=pWjMvrkUqX0

Note, the web server and such will only work on the local network segment at your University. Even there it may not work, depending on the policies of your university. For example, the university may block connection attempts to local machines on port 80 (the standard http port). There are various things you need to do before you can open a web server available everywhere on the internet, which are covered elsewhere in books on how to setup web servers.

Typically, you would need to pay to a web provider to allow you put code up on a shared server (or pay more to have your own dedicated server), pay for a domain name if you have an exclusive name (such as www.my-little-arduino.examples.com). In such a situation, you have the web server handle the general interaction, including some way of notifying the arduino (for example, using a twitter feed or recording the information, and having the arduino poll the web server every so often).