I wanted to investigate controlling the digital outputs on a Arduino from a webpage so I decided to build a simple setup to Turn a LED on and off from a webpage. For this project I used the Arduino Uno R3 and Arduino Ethernet Shield.

Step 1: Configure Web Server

First off we need to configure the web server  this is done by calling the Ethernet libraries, setting the Mac Address, IP Address and Server Port. then in the Void Setup you start the server and define the pin you want to plug the LED into.

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1, 177);

EthernetServer server(80);

void setup()
pinMode(8, OUTPUT);
Ethernet.begin(mac, ip);
<p>are u able to do the same thing if you are not using the local wifi?</p>
<p>i am getting an error about stray '\342' in program.</p><p>if(buffer.indexOf(&ldquo;GET /?status=0&Prime;)&gt;=0)</p><p>Can anyone explain why?</p>
<p>you need to change the quotation marks to type out yourself those quotation marks instead of just copy and paste. </p><p>so change those &quot; in </p><p>'if(buffer.indexOf(&ldquo;GET /?status=0&Prime;)&gt;=0)'</p><p><br></p><p>to you type yourself &quot;. </p>
<p>i am getting an error about a stray &quot;/&quot; in this line..</p><p>if(buffer.indexOf(&ldquo;GET /?status=0&Prime;)&gt;=0)</p><p>Can anyone explain why?</p>
<p>try to rewrite the quotation marks if you have copy pasted the code. </p>
Nicely done. How hard would be to use the buttons to trigger other functions on the arduino? <br>
<p>what the buffer thingy do? </p>
<p>Wonder if you have made any progress on web controlled relays?</p><p>Thanks!</p>
i think buffer = &quot; &quot;; &gt;&gt; clear string in buffer
i have problem this line , buffer = &quot;&quot; ;
very cool, do you plan on expanding this platform?
Hi there, <br> <br>I sure do, Next I will be setting up a web form to control relays. I will post it once i am finished.

About This Instructable




More by jamesrww:Arduino WebServer controlled LED 
Add instructable to: