#include <SPI.h>
#include <Ethernet.h>
#include <LCD4884.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0x20, 0x13 };
IPAddress ip(192,168,0,11);
IPAddress gateway(192,168,0, 1);
IPAddress subnet(255, 255, 255, 0);
static LCD4884 lcd;
EthernetServer server(23);
boolean gotAMessage = false;
int incomingByte = 0;
void setup() {
lcd.begin(84,48);
lcd.print("M4TRiX-v5.84");
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
Serial.begin(9600);
}
void loop() {
EthernetClient client = server.available();
if (client) {
if (!gotAMessage) {
Serial.println("new user online");
client.println("W3Lc0M3 t0 Th3 4d 34 54 52 69 58");
gotAMessage = true;
}
char thisChar = client.read();
server.write(thisChar);
lcd.write(thisChar);
Serial.print(thisChar);
}
}
the only thing you need to download is the LCD4884s library