Closed ghost closed 9 years ago
before connect, set server ip(or domain) like this. MQTT client("mxx.cloudmqtt.com", 13301, callback); and next, connect to the server. client.connect("sparkclient", "id", "password"); You can set the ID(sparkclient) that you like. Now I check the Spark MQTT with cloudmqtt, there is no problem to use.
ok, works!! thank you!
Hi, i have many problem to connect the spark to cloudmqtt. I'm using your example (mqtttest.ino) suppose that my complete cloud mqtt url is: "mqtt://username:password@host:port" where i can put the connection string in your code?
here ? if yes, how? MQTT client("server_name", 1883, callback);
or, (from instructables.com) here? if yes, how?
++ In the "mqtttest.ino" Line 29 : client.connect("sparkclient"); change it to : client.connect("cloudmqtt-url", "userid", "password"); ++
thank you