Summary
In this chapter, we analyzed the requirements for controlling a drone with MQTT messages. We defined the topics that we will use and the commands that will be part of the messages' payloads to control a drone. Then, we worked with the Paho Python Client to write Python code that connected an MQTT client to the MQTT server.
We understood the methods we needed to call for the Paho Python Client and their parameters. We analyzed how callback worked and we were able to publish messages to topics, subscribe to topic filters, and receive and process messages.
We wrote code that processed commands for a drone with Python. The code is able to run on different IoT platforms, including Intel Joule boards and Raspberry Pi 3, and also on any computer ...
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.
Read now
Unlock full access