M5stickc-esp32 Mini Pir Alarm System
About the project
In this project we will learn how to make a mini Alarm Warning using a mini PIR sensor and a M5StickC ESP32 board. Watch the video!
Estimated time: 1 hour
Items used in this project
In this project we will learn how to make a mini Alarm Warning using a mini PIR sensor and a M5StickC ESP32 board.
Watch the video!
1 / 2
- M5StickC ESP32
- Mini PIR Sensor
- Visuino software: Download Visuino here: https://www.visuino.eu
- Connect StickC pin 5V to PIR sensor pin VCC (+)
- Connect StickC pin GND to PIR sensor pin GND (-)
- Connect StickC pin G26 to PIR sensor pin Out
1 / 2
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "M5 Stack Stick C" as shown on Picture 2
1 / 5
- Add "Digital (Boolean) Inverter (Not)" component
Select "M5 Stack Stick C" board and in the properties window expand Modules>Display ST7735 and:Select Elements and click on the 3 dots button and in the elements window
- drag "Draw Field" to the left and in the properties window set size to 3 and Text to "ALARM", Color to aclRed
- drag "Fill Screen" to the left
- set Orientation to goRight
- Close the Elements window
1 / 3
- Connect "M5 Stack Stick C" pin GPPIO26 Out to "M5 Stack Stick C" > LED pin In
- Connect "M5 Stack Stick C" pin GPPIO26 Out to "M5 Stack Stick C" > "Draw Text1" pin Clock
- Connect "Inverter1" pin Out to "M5 Stack Stick C" > "Fill Screen1" pin Clock
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
If you power the M5StickC module the PIR sensor will activate the movement by flashing internal LED and Displaying the text "ALARM" on the Display.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu