arduino - Subscribe in the Nodemcu -


i able publish topic in nodemcu , mqtt dashboard (app android), see:

#include <pubsubclient.h> const char* mqtt_broker = "iot.eclipse.org"; const char* mqtt_clientid = "tccguilf"; pubsubclient client(nodemcuclient); const char* topicotemperatura = "tccguilf/temperatura"; const char* topicoumidade = "tccguilf/umidade"; ... client.publish(topicotemperatura, string(temperatura).c_str(), true); ... 

now, subscribe topic in nodemcu, published mqttdashboard. perhaps:

teste = client.subscribe(topicoteste); 

so not work, i've tried callback functions found on web, no success far.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -