Keeping your home safe from intruders is something that people will go to great lengths for and for good reason! Knowing that our family and belongings are safe offers peace of mind.
Furthermore, the Internet of Things added the ability to check remotely that things are in order and the premise is secure with just a glance on your smartphone or even better with an alarm when something happens that could go to you or directly to a home security company or Police.
So let's explore how we can build such a system that allows the monitoring of a room and of a specific window or door and signals us when someone enters the room or opens said door/window.
The main purpose of this tutorial is to get you started on IoT development using the Waylay IO low-code platform.
If you need help in deploying this solution or building something similar please contact Waylay.io for the low-code IoT Solution or Zalmotek.com for IoT-enabled hardware prototypes.
For this tutorial, we have decided to use the M5Stack Ecosystem because it enables building such a system without prototyping specific tools, such as a soldering iron or prototyping cables. The brain of this project is the M5Core2, an IoT development kit based on the ESP32 microcontroller. This ecosystem allows you to connect the provided modules through a GROVE port to the M5Core2, allowing fast deployment of hardware.
Connect the Ultrasonic Distance Unit to PORT A of the M5Core2 (the red port near the USB-C connector) using the Grove cable. This unit uses the I2C protocol to send data to the M5Core2.
Take out the CORE2 plate on the back to expose the pins.
Connect the PIR Motion Sensor using the Grove cable, the Grove to 4 Pin connector and the male to male Dupont wires to the following pins: