-
Follow manual instructions to plug the Motion sensor with appropriate wires into the ESP32 device.
-
Create a Gmail account (or use an existing one).
- Turn on two-factor authentication and obtain an app password. It should be in this format
xxxx-xxxx-xxxx
- Turn on two-factor authentication and obtain an app password. It should be in this format
-
Connect your M5GO device or ESP32 board. Click the
connected
button in the bottom-left corner and ensure the connection is successful. -
Visit m5stack website and insert main.py into the file.
-
Add the environment variables into the appropriate fields. Choose the appropriate domain name for the
sender_email
:
- AT&T: [email protected] for a normal text message (SMS), or [email protected] for a multimedia message (MMS)
- Verizon: [email protected] for both SMS and MMS messages
- Sprint PCS: [email protected] for both SMS and MMS messages
- T-Mobile: [email protected] for both SMS and MMS messages Domain info taken from source
-
Name the Python file
main
if it's not already. Then run the main.py and test if it works.1
means motion detected0
means no motion detected
-
Change M5GO device into APP Mode -> Reset Device -> Go to Programs -> Scroll down and select the
main.py
file.- Since you are in APP mode, the device will run
main.py
whenever the M5GO device is online.
- Since you are in APP mode, the device will run
The PIR sensor detects the heat emitted by a person or object, and this detection signal is sent to the microcontroller, which then sends an email to the specified recipient.