Telnet relay switch

I recently posted telnet communications code and decided to demo it using an 8-relay Arduino board.Enjoy! XD

//Telnet Relay Contol

// Etherned and SPI
#include <SPI.h>
#include <Ethernet.h>

// I am using a relay attached to pin 9
int relayOne = 9;

// MAC is software-set.
byte mac = { 0x90, 0xA2, 0xDA, 0x00, 0xE3, 0x5B };

// set your own network information as follows
IPAddress ip(0,0,0,0);
IPAddress gateway(0,0,0,0);
IPAddress subnet(255, 255, 255, 0);

EthernetServer telnetServer = EthernetServer(23);

void setup() {
pinMode(relayOne, OUTPUT);

Serial.begin(9600);
Serial.print(“System Start”);

Ethernet.begin(mac, ip, gateway, subnet);

telnetServer.begin();
Serial.print(“Started the Servers\n”);

}

void loop() {

EthernetClient telnetClient = telnetServer.available();

if (telnetClient) {
boolean updatedState = false;

char telnetValue = telnetClient.read();

switch (telnetValue) {
case ‘0’:
updatedState = true;
digitalWrite (relayOne, LOW);
break;
case ‘1’:
updatedState = true;
digitalWrite(relayOne, HIGH);
break;

}
}
}

Sorry for the poor quality video:

Pictures

Optimized-IMG_0893[1].JPG|900x672

Optimized-IMG_0895[2].JPG|900x672