Pages

Thursday, 21 August 2014

Ethernet Module



Quick Overview 
This Ethernet Breakout-Module is simplest way to add LAN connectivity to your microcontroller based products and projects.Use this module to enable Ethernet interface for your product. It works with any microcontroller operating at 3.3V or 5V.This module works at 3.3V and is compatible with 5V interface lines.

Features 
  • Brand new and high quality.
  • chip board ENC28J60-I/SO.
  • the board 25MHZ crystal.
  • the network interface board HR911105A.
  • 3.3 V power supply pin.
  • Size: 6cm x 3.2cm - 2.4inch x 1.28inch.
Codes

#include "etherShield.h"

#include "ETHER_28J60.h"

int outputPin = 6;

static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; // this just needs to be unique for 

your network, 

 static uint8_t ip[4] = {192, 168, 1, 15}; // IP address for the webserver

static uint16_t port = 80; // Use port 80 - the standard for HTTP

ETHER_28J60 e;

void setup()



 e.setup(mac, ip, port);

 pinMode(outputPin, OUTPUT);

}

void loop()

{

 char* params;

 if (params = e.serviceRequest())

 {

 e.print("<h1><a href='/?led=off'>Arduino Web Remote</a></h1>");

 if (strcmp(params, "?led=on") == 0)

 {

 digitalWrite(outputPin, HIGH);

 e.print("<a href='?led=off'><button style='border: 1px solid #ff0000; border-left: 10px solid 

#ff0000' type='button'>LED IS ON</button></a>");

 }

 else if (strcmp(params, "?led=off") == 0)

 {

 digitalWrite(outputPin, LOW);

 e.print("<a href='?led=on'><button style='border: 1px solid #000; border-left: 10px solid 

#000' type='button'>LED IS OFF</button></a>");

 }

 e.respond();

 }

}


 For Documents & Tutorial CLICK HERE