ESP32 Mesh Network for Halloween Prop Control
This project wasuses puta onmesh holdnetwork of ESP32 microcontrollers communicating via ESP-NOW to coordinate a set of Halloween props. The goal is to create synchronized, responsive effects triggered by motion — perfect for haunted house setups or outdoor displays.
System Overview
The network consists of one master controller and multiple slave controllers:
-
Master Node:
Acts as the central coordinator. It’s equipped with awhile,motionbutsensorgiven(suchhalloweenas a PIR sensor) that detects when someone approaches.
When motion is2detected,weekstheaway,mastertimebroadcasts a “trigger” message over ESP-NOW togetallitslavedone.nodes. -
ThisSlavemasterNodes:
EachunitslaveusednodeEspNowcontrolstoanboradcastindividualmotionpropevents(e.g., fog machine, servo motor, LED lighting, sound module, etc.).
Upon receiving the master’s trigger message, the slave performs its assigned action — for example, moving a prop, flashing lights, or playing a sound.
Once the action is complete, the slave sends a “completed” message back to theslavemaster.animations.
Communication Flow
-
Motion Detection:
The master’s PIR sensor detects movement. -
Broadcast Trigger:
The mastercontrollersendsalsoaplays“motion detected” message via ESP-NOW to all registered slave devices. -
Action Execution:
Each slave performs its programmed effect or animation. -
Completion Feedback:
After finishing, each slave sends a “done” signal to thesounds,master. -
Reset or Cooldown:
Once the master receives all “done” signals (or after a timeout), it resets the system andturnswaitsonfor theblacknextlight.motionIt also has a small display to display debug messages.event.
Key Features
-
IESP-NOWhadprotocolaallowsprototypeforworkinglow-latency,aWi-Fi-freemonthcommunicationago,—butnoofroutercourseorforgotinternettorequired.write -
Scalable design — easily add or remove props by pairing additional ESP32s.
-
Bidirectional communication ensures the
wiringmasterpins.knowsTime to figure that outwhen alloverpropsagain.have completed their sequences. -
Energy-efficient — nodes can sleep between triggers.
-
Highly customizable — each slave can have its own timing, behavior, or randomized effect.
Example Use Case
-
Master detects motion → broadcasts “TRIGGER”
-
Slave 1 (fog machine): starts fog → sends “DONE” after 10 seconds
-
Slave 2 (LED lights): flashes red and orange → sends “DONE” after 5 seconds
-
Slave 3 (servo skeleton): waves arm → sends “DONE” after 8 seconds
-
Once all “DONE” signals are received, the master resets and waits for the next visitor.