Skip to content

Instantly share code, notes, and snippets.

@wesen
Created September 21, 2011 10:28
Show Gist options
  • Select an option

  • Save wesen/1231755 to your computer and use it in GitHub Desktop.

Select an option

Save wesen/1231755 to your computer and use it in GitHub Desktop.
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte gateway[] = { 10, 0, 0, 1 };
byte subnet[] = { 255, 255, 0, 0 };
Server server = Server(23);
void setup() {
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
}
void loop()
{
Client client = server.available();
if (client == true) {
byte v = client.read();
analogWrite(9, v);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment