philbowles / PangolinMQTT

PangolinMQTT - ArduinoIDE client library for ESP8266, ESP32 and STM32-NUCLEO
Other
71 stars 21 forks source link

The QuickStart_P code uses ESP8266 specific Wifi functions #4

Closed clementnuss closed 4 years ago

clementnuss commented 4 years ago

The QuickStart code uses <ESP8266.h> specific Wifi functions, which is not compatible with the ESP32.

We should instead only use the function of the <Wifi.h> library, which is more general. The following example shows how to achieve this quite neatly: https://github.com/timpur/arduino-esp32/blob/d72e8137b3933470bfa8292e801389064fd8d001/libraries/WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino#L78

I will propose a Pull request to solve this issue in the coming days.

philbowles commented 4 years ago

Have you tried the other examples on ESP32 ? they compile automatically for theappropriate target. I will look into back-porting that functionality to the quickstart sketches. I thought I had...may have got lost..