arduino / cloud-examples

Examples for Arduino Cloud
11 stars 4 forks source link

Arduino Wifi101 with UNO - problems with Using MQTT with the "Arduino WiFi Shield 101 and Arduino Cloud" sketch #1

Closed sdumans closed 8 years ago

sdumans commented 8 years ago

I just purchased an Arduino Wifi101 shield to accompany my Arduino Uno and have been trying to use the "Arduino Wifi Shield 101 and Aduino Cloud" sketch I found on the internet as a tutorial. I have been exchanging e-mail with Sandeep Mistry who has been helping work through various bugs. In addition to finding that the ledPin assignment to pin 13 doesn't work with the Uno (I switched to pin 3) and some confusion about the Java script file name, it turns out that for some reason, with everything apparently working as far as connection to the MQTT server, the example does not work (e.g. the web-page light doesn't respond to button pushes). Sandeep indicated that the cause appears to be that the MQTT client continuously connects and then disconnects with something on the order of a 40-ms period. He indicated that he will be working to track down the source of the problem.

sdumans commented 8 years ago

Sandeep helped me find the problem. I had failed to properly update my MQTT username in the line 'char mqtt[] = ....'.

sandeepmistry commented 8 years ago

Just to clarify @sdumans's last comment, the line:

char mqttTopic[]      = "/username/001";  // your MQTT topic /<username>/topic

did not contain the same username as:

char mqttUsername[]   = "username";       // your MQTT username