-->
Page 5 of 5

Re: Mqtt subscribe example that i cobbled together. Flashing

PostPosted: Tue Feb 21, 2017 8:41 am
by torntrousers
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.