Page 3 of 3

Re: PE 13: Connecting security sensors to Arduino

Posted: Mon Dec 21, 2015 10:50 pm
by KAJETALK
I was able to get it to compile by changing the callback method to the following:

Code: Select all

void callback(
  char* topic,
  byte* payload,
  unsigned int length) {

And changing the constructor to the following:

Code: Select all

// Instantiate MQTT client
EthernetClient ethClient;
PubSubClient client(server, 1883, callback, ethClient);