Reader small image

You're reading from  Hands-On Internet of Things with MQTT

Product typeBook
Published inOct 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789341782
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Tim Pulver
Tim Pulver
author image
Tim Pulver

Tim Pulver is a Berlin-based freelance interaction designer and developer. In his work, he combines his physical prototyping experience and knowledge of interface design with modern technologies such as 3D printing, laser cutting, web technologies, and machine learning to create unique interactive experiences. In recent years, he has worked on interactive data visualizations, web-based audiovisual experiences, musical interfaces, and cables an innovative browser-based visual programming language that enables the creation of interactive audiovisual prototypes without writing any code. He holds a Bachelor of Arts degree in interface design from the University of Applied Sciences in Potsdam, Germany.
Read more about Tim Pulver

Right arrow

Making the dispenser controllable via MQTT

Now let's add MQTT functionality. What we want to achieve is the following.

The Arduino should subscribe to the /yourname/feeder/feed topic. The namespace consists of three parts: yourname, which you can freely pick, should unify all of your MQTT experiments; feeder, which is the name of your device (you could also give it a longer name, such as food-dispenser); and feed, which is a command we use to release one portion of food. We could also add other commands here. One command that would be good to add is status, to which the device sends a message when it connects or disconnects to the internet and MQTT server. Its namespace would look like this: /yourname/feeder/status. Feel free to add this functionality later on.

To make our feeder accessible via MQTT, we need to combine our current sketch with the MQTT test code...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Internet of Things with MQTT
Published in: Oct 2019Publisher: PacktISBN-13: 9781789341782

Author (1)

author image
Tim Pulver

Tim Pulver is a Berlin-based freelance interaction designer and developer. In his work, he combines his physical prototyping experience and knowledge of interface design with modern technologies such as 3D printing, laser cutting, web technologies, and machine learning to create unique interactive experiences. In recent years, he has worked on interactive data visualizations, web-based audiovisual experiences, musical interfaces, and cables an innovative browser-based visual programming language that enables the creation of interactive audiovisual prototypes without writing any code. He holds a Bachelor of Arts degree in interface design from the University of Applied Sciences in Potsdam, Germany.
Read more about Tim Pulver