I have an Arduino Mega2560 and a seeed studio Ethernet v2.0 shield. ( I believe is says v2.0! on the box. )
I initially just installed it on top of my Mega2560 and used sketch and wiring from Blum’s Exploring Arduino for a web server. I manually set up a dedicated IP address and used a MAC Address that seems to be repeated in several tutorials.
Although the sketches compiled, I could not get any response on my Serial Monitor. But I was using standard Arduino libraries for SPI and Ethernet.
Can you help confirm the following are true:
- Ethernet shields with 2x3 ICSP pins (or at least seeed V2.0 ) are/is compatible with the MEGA2560 without modification. Older version needed mods for the MEGA2560.
- SPI connects to appropriate pin on UNO and MEGA2560
- I will need to change PINs numbers in sketch or Libraries for MEGA2560.
I now have am trying seeed libraries and examples but I can not get the sketches to compile with #include <EthernetV2_0.h> from seeed.
The errors are:
“C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp: In member function ‘void EthernetClass::begin(uint8_t*, IPAddress, IPAddress, IPAddress, IPAddress)’:
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:64:39: error: no matching function for call to ‘W5100Class::setIPAddress(IPAddress::&)’
W5100.setIPAddress(local_ip._address);
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:64:39: note: candidate is:
In file included from C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:1:0:
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:410:6: note: void W5100Class::setIPAddress(uint8_t*)
void W5100Class::setIPAddress(uint8_t _addr) {
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:410:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t {aka unsigned char*}’
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:65:38: error: no matching function for call to ‘W5100Class::setGatewayIp(IPAddress::&)’
W5100.setGatewayIp(gateway._address);
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:65:38: note: candidate is:
In file included from C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:1:0:
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:386:6: note: void W5100Class::setGatewayIp(uint8_t*)
void W5100Class::setGatewayIp(uint8_t _addr) {
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:386:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t {aka unsigned char*}’
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:66:38: error: no matching function for call to ‘W5100Class::setSubnetMask(IPAddress::&)’
W5100.setSubnetMask(subnet._address);
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:66:38: note: candidate is:
In file included from C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:1:0:
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:394:6: note: void W5100Class::setSubnetMask(uint8_t*)
void W5100Class::setSubnetMask(uint8_t _addr) {
^
C:\Users\Natalie\Documents\Arduino\libraries\EthernetV2_0\utility/w5200.h:394:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t {aka unsigned char*}’
Error compiling.”
This appears to me to be the incorrect library for my shield but I downloaded it from the wiki for Ethernet Shield V2.0.
Hopefully someone can correct what I am doing wrong. Your help is much appreciated.