Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Issues setting up Adafruit_MQTT configuration from wifiManager in Arduino #488

Open
Behzad-6-1 opened this issue Jul 16, 2020 · 0 comments

Comments

@Behzad-6-1
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant