Arduino WebServer controlled LED

 by jamesrww
IMAG0105.jpg
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.
 
Remove these adsRemove these ads by Signing Up

Step 1: Configure Web Server

IMAG0106.jpg
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()
{
Serial.begin(9600);
pinMode(8, OUTPUT);
Ethernet.begin(mac, ip);
server.begin();
}
amandaghassaei says: Oct 10, 2012. 10:24 AM
very cool, do you plan on expanding this platform?
jamesrww (author) in reply to amandaghassaeiOct 10, 2012. 9:14 PM
Hi there,

I sure do, Next I will be setting up a web form to control relays. I will post it once i am finished.
waymond91 says: Oct 9, 2012. 7:22 AM
Nicely done. How hard would be to use the buttons to trigger other functions on the arduino?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!