arduino ethernet shield -web server

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

arduino ethernet shield -web server

Postby fitri » Fri Apr 20, 2012 12:15 pm

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-)
fitri
Apprentice
 
Posts: 42
Joined: Mon May 02, 2011 8:20 pm

Re: arduino ethernet shield -web server

Postby fitri » Thu May 03, 2012 3:47 pm

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 :)
fitri
Apprentice
 
Posts: 42
Joined: Mon May 02, 2011 8:20 pm

Re: arduino ethernet shield -web server

Postby sich » Wed May 09, 2012 1:38 am

I'll try to test the code using Arduino 1.0 IDE and let you know my result.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 16 guests

cron