Page 1 of 1

arduino ethernet shield -web server

PostPosted: Fri Apr 20, 2012 12:15 pm
by fitri
Hi all~ :)
do anybody here have an experience using ethernet shield?
if i want to control device thru internet, do i need to setup server for it or just use arduino only?

please give your opinion and suggestion.

tq 8-)

Re: arduino ethernet shield -web server

PostPosted: Thu May 03, 2012 3:47 pm
by fitri
Hi all,
lately I've been testing on this tutorial :
http://tutorial.cytron.com.my/2011/07/2 ... ment-50862

but i face an problem to turn on the LED.

the code that confused me are as follow:

// button functions
client.println("<form method=get name=form>");
client.println("<button name=b value=1 type=submit style=height:80px;width:150px>LED On</button>");
client.println("<button name=b value=2 type=submit style=height:80px;width:150px>LED Off</button>");
client.println("</form><br />");
//---------------------------

did i need to change the value=1 to value=49 (refer to ascii table) in order to meet this expression?

// LED control
if (command == "1") { //49
digitalWrite(LED, HIGH);
}
else if (command == "2") { //50
digitalWrite(LED, LOW);
}
//-------------

i didnt post full code because worried it will be to long..
hope someone can give suggestion.. ;)
thank you :)

Re: arduino ethernet shield -web server

PostPosted: Wed May 09, 2012 1:38 am
by sich
I'll try to test the code using Arduino 1.0 IDE and let you know my result.