This is the code repository for Raspberry Pi and MQTT Essentials, published by Packt.
A complete guide to helping you build innovative full-scale prototype projects using Raspberry Pi and MQTT protocol
The future of IoT has the potential to be limitless. Wouldn’t it be great if you could add this to your known technological stacks. But, where to start? Of course, with the basics.
This book covers the following exciting features:
- Configure and use a Raspberry Pi for IoT projects
- Implement the MQTT communication protocol for projects
- Understand how to set up the NodeMCU and ESP32 boards as MQTT clients
- Control a NodeMCU board through a Node-RED dashboard hosted on Raspberry Pi
- Get LAMP server, Home Assistant, and MariaDB on the Raspberry Pi
- Set up an online MQTT broker on a cloud service or enterprise service provider platform
- Build full-scale, end-to-end prototype projects
If you feel this book is for you, get your copy today!
All of the code is organized into folders. For example, Chapter 3.
The code will look like the following:
void setup ()
{
pinMode (LED_BUILTIN, OUTPUT);
}
Any command-line input or output is written as follows:
sudo apt install mosquitto mosquitto-clients
Following is what you need for this book: This book is for students who are interested in IoT and want to build projects using the available developer hardware. Educators who want to introduce a course on IoT into their curriculum, technology enthusiasts, and IoT developers who are just getting started will also benefit from this book. No prior knowledge about the two main topics that the book covers is required - Raspberry Pi and MQTT. A basic understanding of what IoT is will also be useful but not mandatory.
With the following software and hardware list you can run all code files present in the book (Chapter 1-9).
Hardware covered in the book | Operating System requirements |
---|---|
Raspberry Pi | Windows, macOS, or Linux for your main system |
ESP8266-based NodeMCU development board | Raspberry Pi OS for Pi |
ESP32 development board |
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.
- Page 55: In the section "Practical Demonstration of MQTT in action" of chapter 2, the command in step 9 for publishing the message/temperature is incorrect.
In the example, it uses the switch "-p" as follows:mosquitto_pub -h -t sensors/temperature -p "27"
The correct switch should be "-m":mosquitto_pub -h -t sensors/temperature -m "27"
Dhairya Parikh currently works as a data engineer at Accenture, where he builds efficient data products to help their clients get the most out of their data. He completed his undergraduate studies in Electronics engineering from BVM Engineering College, Anand. He is a seasoned project developer with several award-winning projects under his belt. His most recent literary works include several articles written for the Circuit Cellar Magazine. Most of his articles and projects are based on Internet of Things and Machine Learning. He is an open-source enthusiast with an interest in building projects that bring a positive impact in people’s lives using new development hardware and writing about them in his spare time.
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.