My problem was solved below.
https://github.com/m5stack/M5Stack/tree/master/examples/Modules/W5500
I got the same problem.
I changed the rename of Serial2 and fixed it.
HardwareSerial Serial2(2);
→HardwareSerial Serial2_(2);
And, Arduino Example page in M5Stack LAN Module is "Page not found".
M5Stack-Admin,I want you to correspond.
https://github.com/m5stack/m5stack-documentation/blob/master/en/product-documents/modules/m5stack_lan_module.rst
I found an example of W5500, but it did not work.
W5500 example is
https://github.com/adafruit/Ethernet2
But,I get the following error in my environment.
Failed to configure Ethernet using DHCP
My code is
#include <SPI.h>
#include <Ethernet2.h>
byte mac[] = {
0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
void setup() {
Serial.begin(115200);
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
Serial.print("My IP address: ");
for (byte thisByte = 0; thisByte < 4; thisByte++) {
Serial.print(Ethernet.localIP()[thisByte], DEC);
Serial.print(".");
}
Serial.println();
}
void loop() {
}
I would like to try "LAN Module with W5500 Chip".
Where is LAN Module example??