Hi every one.
I am a newbie.
I have one Arduino Mega 2560 Board and Ethernet Shield W5100
I try to upload Websever sample and use Serial monitor to check, IP return 0.0.0.0
I read some old topic and try some solutions but till now still get IP return 0.0.0.0
Trying number 1:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,2,2);
void setup() {
Serial.begin(9600);
// disable SD card if one in the slot
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
Serial.println("Starting w5100");
Ethernet.begin(mac,ip);
Serial.println(Ethernet.localIP());
}
void loop() {
}
Trying number 2:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x00, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
void setup() {
Serial.begin(9600);
// disable SD SPI
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
Serial.print(F("Starting ethernet..."));
if(!Ethernet.begin(mac)) Serial.println(F("failed"));
else {
Serial.println(Ethernet.localIP());
Serial.println(Ethernet.gatewayIP());
}
}
void loop() {
}
Trying number 3:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,0,2);
void setup() {
Serial.begin(9600);
// disable SD card if one in the slot
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
Serial.println("Starting w5100");
Ethernet.begin(mac,ip);
Serial.println(Ethernet.localIP());
}
void loop() {
}
Trying number 4:
Change pin from 10 to 53
and so on...but till now result is zero.
So, today I open this topic and hope to have some experience people give procedure for all newbie like me how to solve problem for example: about hardware, sketch, libraries....
I think to understand I have a few questions as follow:
-
IP address store in Arduino Board or Ethernet Board ?
-
How to recognize uploading processing is proceeding ok by visible ( for example what LED is blink to show ip address has been saved correctly.)
-
Which bus need to communicate to upload sketch: Pins 10,11,12,13 used to transfer sketch ? 6pins jumper ISCP of Arduino Board under SD card tray of Ethernet Shield is used to transceiver with SD Card?
I hope above questions help us right way to find out problem.
Thanks.