SOLVED For those who come after me…
WiFiClient espClient; PubSubClient mqttClient(espClient);
I got my hands on an Olimex ESP32-EVB board with ethernet. Fantastic board. I’m just having a bit of a hard time understanding the ethernet library.
When I connect to the pubsubclient with ESP32/ESP8266 wifi, I will do something like this towards the top of the sketch…
WiFiClient ethClient; PubSubClient client(ethClient);
If I’m using something like a 5100 shield on an uno/mega (which uses <Ethernet.h>), I would do
EthernetClient ethClient; PubSubClient client(ethClient);
However, the ESP32 uses <ETH.h> and I cannot for the life of me figure out how to define that client so I can use it with the pubsubclient. I see examples like
WiFiClient client; //which still seems to refer to ethernet in this context
However anytime I use something like WiFiClient client; with ETH.h, it freaks out if I’m using it outside of a function.
Can someone point me in the right direction. Obviously I’m over my head on this one. Thanks in advance.