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 e-paper device accessible with MQTT

Integrating MQTT into our existing code is easy. We already have all the pieces ready:

  • Code to display a text on the e-paper module (our main sketch)
  • An example to send text via MQTT

We now need to combine these two so the text we receive via MQTT on the Arduino is used to set the text on the display. Because we have a good abstraction of our code with the setText function, we only have to add one more line of code after integrating the code from the example.

The MQTT example consists of the following parts:

  • Pre-compiler definitions and variable declarations (at the top of the sketch).
  • void setup(): Called once at the beginning, this initializes the serial port and calls the Wi-Fi/MQTT connect ...
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