Forum >DFRduino Ethernet Shield (Support Mega and SD)
ArduinoGeneral

DFRduino Ethernet Shield (Support Mega and SD)

userHead kin@mambohost.co.za 2011-05-10 23:07:27 7023 Views6 Replies
Hi there.

Doet the DFRduino Ethernet Shield (Support Mega and SD) part no DFR0125 also work on the Uno and Duemilanove?

Kind regrards

Kin
2012-02-22 11:25:18 Will the standard UdpNtpClient sketch included with Arduino 22 Ethernet library execute using this board?

I compiled it and tried it with both an Arduino Uno and an Arduino Mega. For unclear reasons, the setup function repeatedly executes. I demonstrated that with the following patch which includes code specific to my network: and longer delay between sending the NTP packet and checking for a response in case there is some sort of latency problem:


[i]diff -u /usr/share/arduino/libraries/Ethernet/examples/UdpNtpClient/UdpNtpClient.pde UdpNtpClient/UdpNtpClient.pde[/i]

[tt]--- /usr/share/arduino/libraries/Ethernet/examples/UdpNtpClient/UdpNtpClient.pde2011-07-15 12:45:24.000000000 -0700
+++ UdpNtpClient/UdpNtpClient.pde 2012-02-21 11:09:51.013474267 -0800
@@ -25,8 **5,9 @@
byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = {
-  192,168,1,177 };
-
+  192,168,123,11 };
+byte gateway[] = {
+  192, 168, 123, 254 };

unsigned int localPort = 8888;      // local port to listen for UDP packets

@@ -39,11 +40,11 @@

void setup()
{
+  Serial.begin(9600);
+  Serial.println("Starting up....");
  // start Ethernet and UDP
-  Ethernet.begin(mac,ip);
+  Ethernet.begin(mac,ip,gateway);
  Udp.begin(localPort);
-
-  Serial.begin(9600);
}

void loop()
@@ -51,7 +52,7 @@
  sendNTPpacket(timeServer); // send an NTP packet to a time server

    // wait to see if a reply is available
-  delay(1000); 
+  delay(3000); 
  if ( Udp.available() ) { 
    Udp.readPacket(packetBuffer,NTP_PACKET_SIZE);  // read the packet into the buffer
[/tt]
userHeadPic Al Pacifico
2012-02-21 21:26:34 [quote="phtan"]
Hi, how can I get the MAC address for the DFRduino Ethernet Shield (Support Mega and Micro SD)?
[/quote]

You can assign the MAC by yourself. It was assigned in Arduino sketch.

"
Ethernet.begin(mac);
Ethernet.begin(mac, ip);
Ethernet.begin(mac, ip, gateway);
Ethernet.begin(mac, ip, gateway, subnet); "
userHeadPic R2D2C3PO
2012-02-21 20:56:30 Hi, how can I get the MAC address for the DFRduino Ethernet Shield (Support Mega and Micro SD)? userHeadPic phtan
2011-07-01 00:51:04 Try to format the sd card in FAT format. Standard example should work as well. userHeadPic R2D2C3PO
2011-06-30 11:51:48 Hi, could you please add some sample code that works with the sd card on the new ethernet shield?
I am not able to get any standard example of any of the sd card libraries to work :-(

Thanks,
cosmic
userHeadPic cosmicboy
2011-05-10 23:14:00 Yes. It is also working with UNO and Duemilanove userHeadPic R2D2C3PO