I am trying to configure Adafruit_MQTT_Client with value from wifiManager at setup.
`
// load json, etc
mqtt = new Adafruit_MQTT_Client(&client, mqtt_serv, mqtt_port, mqtt_name, mqtt_pass);
//Set up the feed you're subscribing to
openClose = new Adafruit_MQTT_Subscribe(mqtt, mqtt_name );`
with value loading from wifiManager
I have tried many ways my last try as above compiler is happy with but now I am stock with another one in my loop
` while ((subscription = mqtt->readSubscription(5000)))
{
//If we're in here, a subscription updated...
if (subscription == &openClose->subscribe)
`
exit status 1 'class Adafruit_MQTT_Subscribe' has no member named 'subscribe'
I have tried it with and without &
i am very new on this forum so may not follow all the rules please advise correction.
I can add my code but don't want to make this too long let me know where is the best place to add lengthy codes
I am trying to configure Adafruit_MQTT_Client with value from wifiManager at setup. ` // load json, etc mqtt = new Adafruit_MQTT_Client(&client, mqtt_serv, mqtt_port, mqtt_name, mqtt_pass);
//Set up the feed you're subscribing to openClose = new Adafruit_MQTT_Subscribe(mqtt, mqtt_name );`
with value loading from wifiManager I have tried many ways my last try as above compiler is happy with but now I am stock with another one in my loop
` while ((subscription = mqtt->readSubscription(5000))) { //If we're in here, a subscription updated... if (subscription == &openClose->subscribe)
` exit status 1 'class Adafruit_MQTT_Subscribe' has no member named 'subscribe'
I have tried it with and without &
i am very new on this forum so may not follow all the rules please advise correction.
I can add my code but don't want to make this too long let me know where is the best place to add lengthy codes