Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things Programming Projects

You're reading from   Internet of Things Programming Projects Build exciting IoT projects using Raspberry Pi 5, Raspberry Pi Pico, and Python

Arrow left icon
Product type Paperback
Published in Jun 2024
Publisher Packt
ISBN-13 9781835082959
Length 458 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Colin Dow Colin Dow
Author Profile Icon Colin Dow
Colin Dow
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Setting Up the Raspberry Pi for IoT Development FREE CHAPTER
2. Chapter 1: Understanding the Raspberry Pi 3. Chapter 2: Harnessing Web Services with the Raspberry Pi 4. Chapter 3: Building an IoT Weather Indicator 5. Chapter 4: Building an IoT Information Display 6. Part 2: Building an IoT Home Security Dashboard
7. Chapter 5: Exploring the GPIO 8. Chapter 6: Building an IoT Alarm Module 9. Chapter 7: Building an IoT Button 10. Chapter 8: Creating an IoT Alarm Dashboard 11. Part 3: Creating a LoRa-Enabled IoT Monitoring Station
12. Chapter 9: Understanding LoRa 13. Chapter 10: Integrating LoRa with the Internet 14. Part 4: Building an IoT Robot Car
15. Chapter 11: Introducing ROS 16. Chapter 12: Creating an IoT Joystick 17. Chapter 13: Introducing Advanced Robotic Eyes for Security (A.R.E.S.) 18. Chapter 14: Adding Computer Vision to A.R.E.S. 19. Index 20. Other Books You May Enjoy

Building an IoT Alarm Module

In the previous chapter, we explored the Raspberry Pi’s GPIO port and built a basic alarm system. We learned about different communication protocols and worked with a set of sensors, which we accessed using the GPIO port. In this chapter, we will enhance our basic alarm system using a Raspberry Pi Pico W, a public Message Queuing Telemetry Transport (MQTT) server, and the MQTTHQ web client (Figure 6.1).

We will use a Raspberry Pi Pico W to host a passive infrared (PIR) sensor and buzzer as we build our IoT alarm module. In our setup, when motion is detected, a motion message is sent to the MQTT server and viewed using the MQTTHQ web client:

Figure 6.1 – IoT-powered alarm module using MQTT

Figure 6.1 – IoT-powered alarm module using MQTT

We will send a buzzer message to the Raspberry Pi Pico W from the MQTTHQ web client to activate the buzzer. This Raspberry Pi Pico W and MQTTHQ web client setup forms the foundation of our IoT home security system.

We&...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime