loading
Picture of Arduino WebServer controlled LED
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

Picture of 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()
{
Serial.begin(9600);
pinMode(8, OUTPUT);
Ethernet.begin(mac, ip);
server.begin();
}
 
waymond912 years ago
Nicely done. How hard would be to use the buttons to trigger other functions on the arduino?
RhemyR waymond917 months ago

what the buffer thingy do?

arniep1 year ago

Wonder if you have made any progress on web controlled relays?

Thanks!

hyeppy1 year ago
i think buffer = " "; >> clear string in buffer
tekin441 year ago
i have problem this line , buffer = "" ;
very cool, do you plan on expanding this platform?
jamesrww (author)  amandaghassaei2 years ago
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.