Compiling error

I am having trouble compiling a sketch which was ok. I get the message C:\Users\User\Documents\Arduino\libraries\Cayenne-MQTT-ESP-master\src/CayenneMQTTWiFiClient.h:42:8: error: ‘class WiFiClass’ has no member named ‘mode’

WiFi.mode(WIFI_STA);

I have tried reinstalling the Cayenne library without success. Please advise what I am doing wrong?

First delete all the library related to cayenne and then download and install it from here https://github.com/myDevicesIoT/Cayenne-MQTT-Arduino

Thanks for you help. I seem to have a number of library files relating to Cayenne and esp32 and MQTT
Cayenne MQTT
Cayenne MQTT-ARDUINO-MASTER
Cayenne MQTT ESP-MASTER
SHOULD i DELETE ALL OF THEM?

yes. delete all of them.

A BIG THANKS. It worked.

1 Like