You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i copy paste your code and change the mqtt and ssid and password info. however when i try to compile with the latest arduino ide i get the following error althoug it is on the code:
mqtt:25: error: 'callback' was not declared in this scope
PubSubClient client(MQTT_SERVER, 1883, callback, wifiClient);
^
exit status 1
'callback' was not declared in this scope
The text was updated successfully, but these errors were encountered:
You need to add the "callback function header" before the line that first calls it. I copied the header along with surrounding code for you to see. This information is in the example code for the pubsubclient library.
char* lightTopic = "/test/light1";
// Callback function header
void callback(char* topic, byte* payload, unsigned int length);
Hi,
i copy paste your code and change the mqtt and ssid and password info. however when i try to compile with the latest arduino ide i get the following error althoug it is on the code:
The text was updated successfully, but these errors were encountered: