MyDevice Cayenne recently made a contest in hackster.io regarding their support for the ESP8266 board. Then I want to try their service and use my Wemos D1 mini to connect to their IoT server/dashboard. And I find it a little difficult to follow along their documentation about ESP8266. and there are no exact explanation about using MQTT for the ESP8266.
This tutorial will cover on how to getting started using MQTT service for the ESP8266 by using Arduino IDE.
Step 1Add your ESP8266 board to your Arduino using this link.
Step 2Sign Up for an account at MyDevice Cayenne site and enter your credential data. After that then login to your newly created account.
Step 3After login you need to create a new device by clicking the "add new" button and the choose "Generic ESP8266".
After you created a new device you will given 3 credential key/token (Username, Password, Client_id) regarding your account. Save this for later because we will use it in the following tutorial.
Add the Arduino library from this link in zip format. Then add the library:
Then choose the library you just downloaded:
And you are done for the library part.
Step 5Now you can try to connect your device to Cayenne by using the example for the library:
At the example code, insert your WiFi SSID and PSK also your user name from the step 2 tutorial to the example code. After you are done. Upload it and open the serial monitor make sure you are connected to the service like in the picture:
Then open your dashboard and you will see that your device is connected and the data will be displayed:
Comments