Demo of the room

This project contains the build instructions and necessary firmware to build an escape room using MakeCode and micro:bit. This room was originally build as a birthday activity; it worked great with kids and adults!

SPOILER ALERT If you read those instructions, it will be much less fun to play the room.

The skeleton story

The plot of the room is fairly basic and can be tweaked to fit your liking:

Around those basic principles, you'll want to build a story that fits the theme of your party or the room ambience. Feel free to remix and modify as you need it.

A code written on the wall A code hidden in furniture A code hidden on pool balls A code hidden on darts target

Materials

The materials below are based on hiding code using UV markers and UV light. It's a fun way to place secret numbers in a room.

Code setup

The first task is to find and hide 4 codes in the room. Using the UV markers,

If you are using the A/B encoder, keep the number short (1000-1000 range) as they will have to be encoded in binary over radio. Once you have picked 4 codes, marked them down on paper.

Device setup

The room is composed of various micro:bit communicating. You will need to download the code in each micro:bit to get the room setup.

It's recommend to use double-sided tape to secure the battery pack to the back of the micro:bit and use clear tap + sharpie to mark each micro:bit with their roles.

Game Master

The game master controls the clock, reset the game and log all messages.

Pressing A removes a minute, B adds a minute, A+B resets the clock.

If the detonator is disabed,the clock will show a WIN message. If the time runs off, it will display a LOSE message.

Clock

The escape clock displays the time.

Try pressing A/B on the game master and check that the clock is updating.

Lock

The escape lock is a micro:bit that controls a combination for a lock. It requires all locks to be enabled for them to show their digits.

Each lock is waiting for a code to be sent via radio.

Phone

The escape phone is a rotary phone driver to send codes over radio. Players use it to send codes to the locks.

Detonator

The escape detonator, is a hidden micro:bit that needs to be disabled by pressing a button

Room setup

Once all the micro:bit have been prepared, you're ready to put it all together and get the escaping to work.

API Usage

If you plan to modify the code, here's a bit of docs.

onEvent

Received when a particular event happened on a device in the game.

onUpdate

Use this function register the code that renders the current state to the gizmo. If the game is lost or won, it will display the correct animation.

>escape.onUpdate(function() {
})

Use this extension

This repository can be added as an extension in MakeCode.

Edit this extension

To edit this repository in MakeCode.

Metadata (used for search, rendering)

<script src="https://makecode.com/gh-pages-embed.js"> <script> makeCodeRender("https://makecode.microbit.org/", "pelikhan/pxt-escape");