Well great, i did not get it at first but fixed that using this tutorial:
https://randomnerdtutorials.com/install ... tructions/
i installed the pubsubclient using this tutorial:
https://www.baldengineer.com/installing ... ithub.html
and this is the github:
https://github.com/Imroy/pubsubclient
but now i get this...
Code: Select all
Arduino: 1.8.12 (Windows 10), Board: "AI Thinker ESP32-CAM"
C:\Users\Jelle\sketchbook\sketch_may23a\sketch_may23a.ino: In function 'void reconnect()':
sketch_may23a:618:64: error: no matching function for call to 'PubSubClient::connect(const char*, const char [1], const char [1])'
if (client.connect(clientId.c_str(),MQTT_USER,MQTT_PASSWORD)) {
^
In file included from C:\Users\Jelle\sketchbook\sketch_may23a\sketch_may23a.ino:10:0:
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:119:9: note: candidate: bool PubSubClient::connect(String)
bool connect(String id);
^
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:119:9: note: candidate expects 1 argument, 3 provided
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:131:9: note: candidate: bool PubSubClient::connect(String, String, uint8_t, bool, String)
bool connect(String id, String willTopic, uint8_t willQos, bool willRetain, String willMessage);
^
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:131:9: note: candidate expects 5 arguments, 3 provided
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:193:9: note: candidate: bool PubSubClient::connect(MQTT::Connect&)
bool connect(MQTT::Connect &conn);
^
C:\Users\Jelle\sketchbook\libraries\pubsubclient-master\src/PubSubClient.h:193:9: note: candidate expects 1 argument, 3 provided
sketch_may23a:629:27: error: 'class PubSubClient' has no member named 'state'
Serial.print(client.state());
^
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Jelle\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
no matching function for call to 'PubSubClient::connect(const char*, const char [1], const char [1])'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.