Home Creators Posts Import Register Favorites Logout

Content

Hi folks! This is a tutorial about how to create an escape room "security terminal" into which players need to enter the correct override password in order to deactivate a door which is secured by a maglock.

This is one of my more complex projects to date because, rather than using a simple input (a button, or rotary knob, say) to control a relay, I've created a PC application that simulates an old-fashioned terminal screen using the Unity game engine. When the correct password is entered, the application sends a message to an MQTT broker. A D1 mini (or Arduino, or other equivalent microprocessor) is also subscribed to that MQTT broker and, when it receives this message sent from the app, triggers a relay to cut power to the maglock.

This make the infrastructure required to run this project relatively involved - you'll need a PC for the terminal app and a network-enabled microprocessor for the door control, and a local network (i.e. a Wi-Fi network, or local wired network) that they can both connect to. And you'll need to make a few changes to their corresponding scripts to configure that connection. But, what I hope to demonstrate is just how powerful this infrastructure can be - MQTT is completely platform-agnostic, and libraries exist for Arduino, Raspberry Pi, PC, Android and iOS tablets, mobile phones, and many more devices. Once you have the network set-up as described in this project, it's trivial to add additional devices that can send and receive messages to communicate with each other to create some amazing tech puzzles: you could have a button on an Arduino that triggers a video playback on a Raspberry Pi, or a touchscreen app on a tablet that causes an Arduino to extend a linear actuator etc. etc. And all of this can be monitored or overridden from a PC in a control room. 

Additional documentation, code downloads for the Arduino sketch and Unity project etc. are available for Patreons at https://www.patreon.com/posts/security-puzzle-27023093 

In the meantime, please ask if you have any questions!

Files

Escape Room Security Terminal Puzzle Tutorial

Arduino code, Unity project, wiring diagrams, and additional resources for this and all my other projects are available on my Patreon page: https://www.patreon.com/playfultech In this video, I'll explain how to create a high tech "Security Terminal" escape room puzzle, using a Unity application to provide a front-end interface, and a Wemos D1 Mini (although you could alternatively use an Arduino with Wi-Fi/ethernet shield or ESP32) to control hardware via a relay module. Players encounter a terminal console (a desktop or laptop PC which is running a custom Unity application) which prompts them to enter a security override password. Entering the correct password causes the app to send a message to an MQTT broker (which can either be running on the same PC as the terminal app, or a PC in the ER control room etc.). The Wemos D1 mini is also subscribed to this broker and, when it receives the message, deactivates a maglock to release the door, and triggers a strip of Neopixel LED lights to flash green. Entering an incorrect password re-activates the lock and secures the door again. This could be used in a wide variety of escape room themes, from spies to space stations. Timings --- 00:00 - 02:01 Demo 02:02 - 11:32 Hardware & Wiring for Security Door Control 11:33 - 13:45 Hardware for Security Terminal 13:46 - 18:07 Software - Mosquitto broker, M2MQTT and PubSubClient libraries 18:08 - 37:24 Software - Arduino/D1 mini code for Security Door 37:25 - 50:54 Software - Unity project for Security Terminal 50:55 - 53:24 Demo again with live monitoring 53:25 - 57:18 Making the system player-proof with Sharpkeys! 57:19 - 58:39 Wrap-up!

Comments

Jon

Great! I was looking to do something similar on Unity but using buttons instead of typing a code to create some sort of "Administration UI". My goal is to create a 2D interface for the GameMaster (with some cool icons like an old fashioned 2d rpg game), to see check the status of the puzzles in the Escaperoom, being able to reset all of them, solve any (if required) etc... If you allow me, I think that this UI would also be a good proyect for your channel :D With this useful info, I will be able to give it a try in a couple months. Thank you!

Anthony Morgan

How adaptable would this be for use on a Pi with a relay shield?