This is my first post on the Arduino forums :).
I am currently trying to create a controller for my garage door which communicates with my home assistant server via mqtt using a W5500 Ethernet board. In my sketch I use the following libraries:
#include <Ethernet.h> #include <PubSubClient.h> #include <ArduinoJson.h>
I tried to do this with an arduino Nano but soon ran into memory issues due to having to send a huge JSON configuration char array (460 bytes). I tried optimizing memory usage, but got tired always operating at the edge of having no more memory available.
I had a Raspberry Pi Pico lying around and thought maybe I could use it instead, sure enough it has quite a lot more RAM compared to the NANO.
I got the Pico to connect to the Arduino IDE and can upload sketches just fine. When trying to compile my garage door sketch though, I get the following compilation error, which occurs in the Ethernet or PubSubClient library (not really sure which one):
In file included from C:\Users\miche\OneDrive\Dokumente\ArduinoData\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/connectivity/lwipstack/lwip-sys/arch/cc.h:38:0, from C:\Users\miche\OneDrive\Dokumente\ArduinoData\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/connectivity/lwipstack/lwip/src/include/lwip/arch.h:48, from C:\Users\miche\OneDrive\Dokumente\ArduinoData\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/connectivity/lwipstack/lwip/src/include/lwip/prot/Ethernet.h:40, from C:\Users\miche\Arduino\sketch_GaragentorSteuerung\sketch_GaragentorSteuerung.ino:9: C:\Users\miche\OneDrive\Dokumente\ArduinoData\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h:34:2: error: #error "Either IPv4 or IPv6 must be enabled." #error "Either IPv4 or IPv6 must be enabled." ^~~~~ C:\Users\miche\OneDrive\Dokumente\ArduinoData\packages\arduino\hardware\mbed_rp2040\2.1.0\cores\arduino/mbed/connectivity/lwipstack/include/lwipstack/lwipopts.h:71:2: error: #error "Either IPv4 or IPv6 must be preferred." #error "Either IPv4 or IPv6 must be preferred." ^~~~~ exit status 1 Error compiling for board Raspberry Pi Pico.
Any idea what is going on here? I am no C++ expert so I cannot really tell which library might cause the issue in the first place.
Any help on this would be greatly appreciated.