Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By torntrousers
#62840
paysan wrote:leeg:15: error: 'callback' was not declared in this scope
PubSubClient client(server, 1883, callback, wifiClient);
^
exit status 1
'callback' was not declared in this scope


Do you have a function named "callback"? If so then there is an ordering problem that comes up in some versions of the Arduino / ESP8266 code so try adding this line to your sketch:

void callback(char* topic, byte* payload, unsigned int payloadLength);

_before_ that line 15 which fails.