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
Post a Comment