DFRobot Ethernet Shield errors

I'm very new to the world of Arduino and recently purchase an Arduino UNO (SMD Edition) and a DFRobot Ethernet Shield W5200 V1.0. I've had some success using the UNO but have not been able to get the Ethernet Shield to work at all.
I'm using IDE V1.6.6 on Windows 7. I unzipped the the DFRobot ethernet library as instructed and tried the DhcpAddressPrinter example (sketch below) but keep getting error messages.
-----------------------------Begin Sketch--------------------------------------------------
------------------------End Sketch-------------------------------------
The error messages are:
_________________Error Messages_______________________________
______________________________________________________________
What am I missing/doing wrong? I've searched high and low through forums and Google but have no idea what's going on. Any assistance is greatly appreciated.
Cheers!
I'm using IDE V1.6.6 on Windows 7. I unzipped the the DFRobot ethernet library as instructed and tried the DhcpAddressPrinter example (sketch below) but keep getting error messages.
-----------------------------Begin Sketch--------------------------------------------------
Code: Select all
/*
DHCP-based IP printer
This sketch uses the DHCP extensions to the Ethernet library
to get an IP address via DHCP and print the address obtained.
using an Arduino Wiznet Ethernet shield.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
created 12 April 2011
by Tom Igoe
*/
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = {
0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// start the serial library:
Serial.begin(9600);
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
// print your local IP address:
Serial.print("My IP address: ");
for (byte thisByte = 0; thisByte < 4; thisByte++) {
// print the value of each byte of the IP address:
Serial.print(Ethernet.localIP()[thisByte], DEC);
Serial.print(".");
}
Serial.println();
}
void loop() {
}
------------------------End Sketch-------------------------------------
The error messages are:
_________________Error Messages_______________________________
Code: Select all
Arduino: 1.6.6 (Windows 7), Board: "Arduino/Genuino Uno"
In file included from C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:2:0:
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.h:10:0: warning: "MAX_SOCK_NUM" redefined [enabled by default]
#define MAX_SOCK_NUM 4
^
In file included from C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:19:0: note: this is the location of the previous definition
#define MAX_SOCK_NUM 8
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp: In member function 'void EthernetClass::begin(uint8_t*, IPAddress, IPAddress, IPAddress, IPAddress)':
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:63:39: error: no matching function for call to 'W5100Class::setIPAddress(IPAddress::<anonymous union>&)'
W5100.setIPAddress(local_ip._address);
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:63:39: note: candidate is:
In file included from C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:410:6: note: void W5100Class::setIPAddress(uint8_t*)
void W5100Class::setIPAddress(uint8_t *_addr) {
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:410:6: note: no known conversion for argument 1 from 'IPAddress::<anonymous union>' to 'uint8_t* {aka unsigned char*}'
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:64:38: error: no matching function for call to 'W5100Class::setGatewayIp(IPAddress::<anonymous union>&)'
W5100.setGatewayIp(gateway._address);
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:64:38: note: candidate is:
In file included from C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:386:6: note: void W5100Class::setGatewayIp(uint8_t*)
void W5100Class::setGatewayIp(uint8_t *_addr) {
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:386:6: note: no known conversion for argument 1 from 'IPAddress::<anonymous union>' to 'uint8_t* {aka unsigned char*}'
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:65:38: error: no matching function for call to 'W5100Class::setSubnetMask(IPAddress::<anonymous union>&)'
W5100.setSubnetMask(subnet._address);
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:65:38: note: candidate is:
In file included from C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:394:6: note: void W5100Class::setSubnetMask(uint8_t*)
void W5100Class::setSubnetMask(uint8_t *_addr) {
^
C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet\utility/w5100.h:394:6: note: no known conversion for argument 1 from 'IPAddress::<anonymous union>' to 'uint8_t* {aka unsigned char*}'
Multiple libraries were found for "Ethernet.h"
Used: C:\Users\Paul Nanscawen\Documents\Arduino\libraries\Ethernet
Not used: C:\Program Files (x86)\Arduino\libraries\Ethernet
exit status 1
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
______________________________________________________________
What am I missing/doing wrong? I've searched high and low through forums and Google but have no idea what's going on. Any assistance is greatly appreciated.
Cheers!
2017-08-25 08:51:59 Thank you. I went to manage libraries, and selected version 1.0.5 and it compiled. Without your help there is no way I could have solved this
chet.ramphal


2015-12-15 01:28:25 Thank you Leff! That seems to have solved the problem. I've been agonizing over this.
And thank you for tidying up the page.
pnanscawen
And thank you for tidying up the page.


2015-12-15 00:49:36 Hello,
Sorry that this shield is ONLY compatible with Arduino 1.0 (suggest 1.0.6) instead of 1.6*. Plz have a try to see if it will work?
(I changed your code format in your post to make the page good looking
)
Leff
Sorry that this shield is ONLY compatible with Arduino 1.0 (suggest 1.0.6) instead of 1.6*. Plz have a try to see if it will work?
(I changed your code format in your post to make the page good looking

