Ghost Protocol: Sentry's Gate
In every spy movie, there is that iconic moment: the high-tech hallway filled with invisible lasers, where the hero must move with perfect precision to avoid detection. Ghost Protocol: Sentry’s Gate brings that cinematic thrill into your own home using a Wemos D1 Mini (ESP8266), a PIR motion sensor, and a bit of clever code.
The Project
Designed for aspiring secret agents, this project is a "Stealth Trainer." The "Sentry"—powered by the compact ESP8266 D1 Mini—uses its "Heat Vision" (PIR sensor) to monitor a perimeter. If a player moves too fast or fails to find the sensor's blind spot, the system triggers a visual alarm via a high-intensity LED array.
This isn't just a game; it’s a hands-on introduction to:
- Infrared Technology: Learning how Passive Infrared (PIR) sensors detect shifting body heat rather than just light.
- Logic-Based Programming: Creating "if-then" scenarios where movement triggers a security state.
Caution: remember this game is build with playrs as main labor force and they invent the gameplay so some parts may vary.
Supplies
This project is really coming to life! Here is the component list rewritten to keep that "Super Secret Sentry" vibe going for the kids.
The Sentry’s Internal Tech
Every high-tech gadget needs a brain, senses, and muscles. Here is what we’re using to bring our guardian to life:
- The Brain (ESP8266 D1 Mini): This tiny but mighty microcontroller is the mission control center. It’s the one running our top-secret "Ghost Protocol" code.
- The All-Seeing Eyes (HC-SR501 PIR): These sensors detect heat signatures! If a "spy" tries to sneak past, the PIR sensor will spot their movement instantly.
- The Alarm System (WS2812B LED Strip): Our visual signal to let us know what’s happening:
- Green: Area Clear (Safe)
- Blue: Scanning... (Searching for targets)
- Red: INTRUDER ALERT!
- The Disarming Cables (Alligator Clips): To add a fun twist to the game, we’re using Red, Green, and Yellow clips. You’ll have to "wire-hack" these to disarm the sentry!
- The Muscles (HD 1800 Servos): These little guys handle the sentry’s rotation. They might be small, but they’re what we have in the workshop, and they’re perfect for getting the job done!
The Gear & Hardware
Beyond the electronics, we need some physical parts to hold it all together. Even the best-planned projects need a few extra bits and pieces:
- The Armor (Enclosures):
- For the main body, we’re being resourceful! We found a free electrical box that fits everything perfectly.
- For the "Eyes," we’re using a custom 3D-printed sensor box.
- And don’t forget the main assembly mount for the moving parts!
- The Connectors: We’ll need a handful of jumper wires (the "vessels" of our sentry) and some USB-C connectors to keep the power flowing.
- The Nuts & Bolts: 6 sets of bolts and nuts to include in our top-secret game set-up.
- Control Switches: A few extra toggle switches to give us manual control over the system.
Time to Make Some Holes
Building projects with kids is all about balancing the "cool factor" with the reality of learning as you go. Since this "Sentry" is a work in progress, we want an enclosure that functions well now but stays flexible for later.
Here is a more relatable way to track what the project needs:
Our Sentry Build Checklist
To get our project housing ready for action, we need to make room for these essential parts:
- The Sentry’s "Neck" (2-Axis Gimbal): We need a dedicated spot to mount the gimbal so our sentry can look around freely.
- The Power Portal: An easy-access opening for the On/Off (Restart) switch so we can reboot the system in a flash.
- The "Game On" Button: A specific cutout for the Game Switch—this is where the fun starts!
- Taming the Wire Monster: Some handy openings in the lid to keep our cables organized and tucked away, rather than a "spaghetti" mess.
- The Safety Key: Precise holes for the disarming bolts, which allow us to "power down" the sentry safely.
A Note on "Future-Proofing"
Remember, this project is a living thing! We don’t have to get every single hole perfect right now. As we add cool new features—like LED light strips or extra sensors—we’ll drill new paths for the wires.
Think of the enclosure as a prototype that grows along with our skills.
Operation: Hot Solder — Fusion of the Ghost Protocol Circuits
This is where the project gets really interesting—and maybe a little bit chaotic. We’re moving into the "wiring lab," and I’ve decided to add a little spice to the challenge.
Here is the plan for our "Expert Level" wiring phase:
The Great Wire-Weaving Challenge
Now it’s time to connect the brain to the body. To make things interesting (and because our other colors have currently turned into "ghosts"), we are doing this in Hard Mode:
- The Monochrome Mystery: We’re using only one color for all our jumper wires! It makes the board look sleek, but it means we have to be extra sharp. It’s the ultimate test of our "Ghost Protocol" focus.
- The "Battle-Tested" Brain: You’ll see the D1 Mini is tucked safely onto a prototyping board. This "sophisticated" setup was earned through experience—specifically, the sacrifice of two D1 Minis that didn’t quite make it through the earlier testing phases. RIP to the fallen tech!
- The Solder Bond: Luckily, the wiring isn't too complex. A steady hand and a bit of solder are all it takes to turn these loose parts into a solid machine.
Setting the Disarm Trap
We have to be very specific with how we wire the "game" part of the sentry so it actually works when the kids play with it:
- The Bolts: These are wired to pins D1, D2, and D3. They act as the "locks" of the system.
- The Alligator Clips: These are connected to GND (Ground).
- The Goal: The game is simple—touch the clip to the bolt to complete the circuit!
Pro-Tip for the Lead Engineer: Wiring it this way makes for some "interesting" debugging sessions, especially when kids are involved in the soldering. If things don’t work right away, don't worry—that's just a surprise "logic puzzle" for us to solve together!
Data Leak: Downloading the "Ghost Protocol" Source Files
Here is the story of how the "Ghost Protocol" code actually brings your Sentry to life, told:
Chapter 1: The Guard on Duty
When the Sentry is in Patrol Mode, the code acts like a vigilant security guard. It sends signals to the "muscle" servos, telling them to smoothly scan the room—left, right, up, and down—searching for targets. While it’s on watch, the LED strip pulses with a soft blue "heartbeat" to show the system is active. If the "All-Seeing Eye" (PIR sensor) catches the heat signature of a moving spy, the code triggers a sudden flash of red, letting everyone know that an intruder has been spotted!
Chapter 2: The Security Breach
The moment someone flips the master switch, the Sentry enters Game Mode, and the "Ghost Protocol" begins. First, the Sentry puts on a 10-second rainbow light show—think of this as the system being "hacked" by a spy. Once the colors fade, the brain generates a random puzzle, lighting up some of the Red, Green, or Yellow LEDs. The Sentry then starts a high-stakes 30-second countdown, waiting to see if the spy is clever enough to disarm it using the alligator clips.
Chapter 3: The High-Stakes Hack
This is where the real fun happens. The code is constantly "listening" to the alligator clips to see which one touches the bolts. To win, the spy has to find the "dead" circuit—the color that isn't lit up. If you clip the right wire, the code celebrates by turning the entire strip a victorious Green for a whole minute. But, if you pick the wrong wire or the 30-second timer hits zero, the Sentry locks down with a solid Red light, signaling a failed mission. Whether it's scanning the room or judging a hack-off, the code is the secret sauce that makes the metal and wires act like a real robot!
Accessing the Secret Archives
To get the Ghost Protocol running on your own D1 Mini, you’ll need to download the blueprints from our secure server. Head over to the SpyGame GitHub Repository to find the latest version of the code. Just look for the green "Code" button to download the files to your machine, and you’ll have everything you need to start programming your Sentry’s brain. Remember, keep this link safe—it’s the heart of the entire operation!
Operation Disarm: the Official Rules
Do you have the speed of a ninja and the brain of a master hacker? To defeat the Sentry, you have to survive three dangerous phases. Follow these rules, or get caught in the red glare!
- Phase 1: The Green Light Dash 🏃♂️ When the Sentry’s eyes are glowing Green, it is calibrating its sensors. This is your chance! Move fast, stay low, and get as close as you can. You need to reach the controls before the light changes.
- Phase 2: The Blue Heartbeat (Freeze!) ❄️ If the Sentry starts pulsing Blue, it’s in "Search Mode." Stop moving immediately! Like a predator in the wild, it is looking for any heat signature or movement. If you move now, the "All-Seeing Eye" will spot you and flash Red—mission failed!
- Phase 3: The System Hack ⚡ If you’re sneaky enough to reach the Sentry, flip the "Design Flaw" switch to start the override. The LEDs will explode into a Rainbow Cycle—this is the system crashing! But be careful: the Sentry will then show you a trick puzzle with Red, Green, and Yellow lights.
- The Final Disarm (The Logic Test) 🧠 The Sentry is trying to mess with your head! Look at the lights and find the Missing Color. If Red and Yellow are glowing, they are "locked." You must grab the Green alligator clip and touch it to the bolt to win!
- Warning: You are being Timeboxed! If you aren't fast and precise with your clips, the system will lock down, and the alarm will sound!
The R&D Lab: Brainstorming Secret Enhancements
Even the most high-tech security system—and its lead engineer—needs a little bit of downtime! After a long day of catching spies, every Sentry Overseer deserves a break. Here is what we’re thinking for the next phase of development:
- The Sound Sniffer: We want to add a Microphone Sensor to the Sentry’s toolkit. This would allow it to track noise levels in the room. Imagine if the Sentry stayed asleep while it’s quiet, but the moment it hears a floorboard creak or a spy whispering, it snaps into action! It’s the perfect way to make sure the Sentry is always listening, even when it isn't looking.