Skip to Main Content
Hands-On Internet of Things with MQTT
book

Hands-On Internet of Things with MQTT

by Tim Pulver
October 2019
Intermediate to advanced content levelIntermediate to advanced
350 pages
9h 5m
English
Packt Publishing
Content preview from Hands-On Internet of Things with MQTT

Making your device smart

The detection of all of our cube sides is working now. Let's add MQTT to our code base:

  1. Open the MQTT example code from this book's repository: general/arduino/mqtt_shiftr_send_receive_example.

As we did in the other projects, let's run this test-code first before we integrate it into our main sketch to make sure the Wi-Fi, as well as the MQTT connection, is working.

  1. Enter your Wi-Fi name (WIFI_SSID) and Wi-Fi password (WIFI_PASSWORD). You can also customize MQTT_DEVICE_NAME. You will see it on shiftr.io when you look at the network graph.
  2. Pick any name you like here, but stick to the characters a-z, 0-9, and dash (-). Other characters might work as well but might also lead to problems with certain MQTT clients ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical IoT Hacking

Practical IoT Hacking

Fotios Chantzis, Ioannis Stais, Paulino Calderon
Internet of Things (IoT) Fundamentals

Internet of Things (IoT) Fundamentals

Jerome Henry / Rob Barton

Publisher Resources

ISBN: 9781789341782Supplemental Content