I have Aurduino Uno and Ethernet shield ENC82J60 365建站器提示:Database Error - www.365jz.com
The code work fine. I Stack the ethernet shield on Arduino Uno
/*
* UIPEthernet EchoServer example.
*
* UIPEthernet is a TCP/IP stack that can be used with a enc28j60 based
* Ethernet-shield.
*
* UIPEthernet uses the fine uIP stack by Adam Dunkels <adam@sics.se>
*
* -----------------
*
* This Hello World example sets up a server at 192.168.1.6 on port 1000.
* Telnet here to access the service. The uIP stack will also respond to
* pings to test if you have successfully established a TCP connection to
* the Arduino.
*
* This example was based upon uIP hello-world by Adam Dunkels <adam@sics.se>
* Ported to the Arduino IDE by Adam Nielsen <malvineous@shikadi.net>
* Adaption to Enc28J60 by Norbert Truchsess <norbert.truchsess@t-online.de>
*/
#include <SPI.h>
#include <UIPEthernet.h>
//#include <SD.h>
EthernetServer server = EthernetServer(80);
void setup()
{
/*Serial.begin(9600);
pinMode(2,OUTPUT);
digitalWrite(2,HIGH);
pinMode(3,OUTPUT);
digitalWrite(3,HIGH);
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
pinMode(5,OUTPUT);
digitalWrite(5,HIGH);
pinMode(6,OUTPUT);
digitalWrite(6,HIGH);
pinMode(7,OUTPUT);
digitalWrite(7,HIGH);
pinMode(8,OUTPUT);
digitalWrite(8,HIGH);
pinMode(9,OUTPUT);
digitalWrite(9,HIGH);
pinMode(10,OUTPUT);
digitalWrite(10,LOW);
*/
uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
IPAddress myIP(192,168,1,200);
Ethernet.begin(mac,myIP);
server.begin();
}
void loop()
{
size_t size;
if (EthernetClient client = server.available())
{
while((size = client.available()) > 0)
{
uint8_t* msg = (uint8_t*)malloc(size);
size = client.read(msg,size);
Serial.write(msg,size);
free(msg);
}
client.println("DATA from Server!");
client.stop();
}
}
and I can open the 192.168.1.200 from browser without problem
when I add #include <SD.h> to Code it get may be conflict and I can't open the web page although I can't add any SD card shield
and my Ethernet shield do not have the SD card slot . the Ethernet Shield use ss pin 10 . and try set all pin to HIGH and pin 10 to
LOW . from month I can not find solution. sorry for bad English