{"id":15417976,"url":"https://github.com/pelikhan/pxt-escape","last_synced_at":"2025-06-25T02:02:33.910Z","repository":{"id":125490508,"uuid":"227915135","full_name":"pelikhan/pxt-escape","owner":"pelikhan","description":"Escape room framework built for micro:bit and MakeCode","archived":false,"fork":false,"pushed_at":"2020-03-04T23:39:19.000Z","size":264,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T21:51:17.692Z","etag":null,"topics":["escape","makecode","microbit","room"],"latest_commit_sha":null,"homepage":"https://pelikhan.github.io/pxt-escape/","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pelikhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-13T20:16:06.000Z","updated_at":"2021-01-17T03:29:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ad0281b-64d1-43c4-b194-50e7087a4ad0","html_url":"https://github.com/pelikhan/pxt-escape","commit_stats":{"total_commits":147,"total_committers":2,"mean_commits":73.5,"dds":0.006802721088435382,"last_synced_commit":"b5c2aa67ddf9de185eb2e14fa06c3710d3c1f392"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/pelikhan/pxt-escape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fpxt-escape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fpxt-escape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fpxt-escape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fpxt-escape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pelikhan","download_url":"https://codeload.github.com/pelikhan/pxt-escape/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelikhan%2Fpxt-escape/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261789230,"owners_count":23209774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["escape","makecode","microbit","room"],"created_at":"2024-10-01T17:18:44.800Z","updated_at":"2025-06-25T02:02:33.889Z","avatar_url":"https://github.com/pelikhan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Demo of the room](https://img.youtube.com/vi/je-6slUD054/0.jpg)](https://www.youtube.com/watch?v=je-6slUD054)\n\nThis project contains the build instructions and necessary firmware to build \nan escape room using MakeCode and micro:bit. \nThis room was originally build as a birthday activity; it worked great with kids and adults!\n\n\u003e **SPOILER ALERT** If you read those instructions, it will be much less fun to play the room.\n\n## The skeleton story\n\nThe plot of the room is fairly basic and can be tweaked to fit your liking:\n\n* play players have a fixed time  to find and disable the bomb (the **clock micro:bit** displays countdown)\n* the bomb mechanism (the **bomb micro:bit**) is inside in a box\n* the box is locked by a physical combination lock\n* the key of the combination lock is registerd in 4 micro:bit (**lock micro:bit**)\n* each key micro:bit can be unlocked via a unique code transmitted using radio\n* a micro:bit device is available in the room to transmit codes (rotary phone or binary encoder **phone micro:bit**)\n* codes are hidden in the room one way or the other\n* a **game master micro:bit** allows the operator to monitor the status of the system\nand control the clock.\n\nAround those basic principles, you'll want to build a story that fits the theme of your party\nor the room ambience. Feel free to remix and modify as you need it.\n\n![A code written on the wall](./assets/img/sticks.jpg)\n![A code hidden in furniture](./assets/img/score.jpg)\n![A code hidden on pool balls](./assets/img/balls.jpg)\n![A code hidden on darts target](./assets/img/darts.jpg)\n\n## Materials\n\nThe materials below are based on hiding code using UV markers and UV light.\nIt's a fun way to place secret numbers in a room.\n\n* 7 micro:bits, battery packs and spare batteries\n* a UV light marker\n* 2 UV flashlight, the same flashlight used to spot dog pee spots\n* a box and a 4-digit combination lock for that box\n* (optional) Music speaker and smoke machine\n* (optional) a old rotary phone\n* (optional) a old typewriter\n\n## Code setup\n\nThe first task is to find and hide 4 codes in the room. Using the UV markers,\n\n* you can draw a code as sticks on the wall,\n* you can paint the numbers of a computer keyboard,\n* find more ways to encode codes in your room!\n\nIf you are using the A/B encoder, keep the number short (1000-1000 range) as they will have to be encoded in binary\nover radio. Once you have picked 4 codes, marked them down on paper.\n\n## Device setup\n\nThe room is composed of various micro:bit communicating. \nYou will need to download the code in each micro:bit to get the room setup.\n\nIt's recommend to use double-sided tape to secure the battery pack to the back of the\nmicro:bit and use clear tap + sharpie to mark each micro:bit with their roles.\n\n### Game Master\n\nThe [game master](https://github.com/pelikhan/pxt-escape-game-master)\ncontrols the clock, reset the game and log all messages.\n\n* **Update the game master source code with your codes!**\n* Download the program\n* Connect the micro:bit game master to the editor to \nsee the messages in the console.\n\nPressing A removes a minute, B adds a minute, A+B resets the clock.\n\nIf the detonator is disabed,the clock will show a ``WIN`` message.\nIf the time runs off, it will display a ``LOSE`` message.\n\n### Clock\n\nThe [escape clock](https://github.com/pelikhan/pxt-escape-clock)\ndisplays the time.\n\n* Download the program\n* Check that the clock displays time\n\nTry pressing A/B on the game master and check that the clock is updating.\n\n### Lock\n\nThe [escape lock](https://github.com/pelikhan/pxt-escape-lock)\nis a micro:bit that controls a combination for a lock.\nIt requires all locks to be enabled for them to show their digits.\n\n* Change the digit for each micro:bit and download it.\n\nEach lock is waiting for a code to be sent via radio.\n\n### Phone\n\nThe [escape phone](https://github.com/pelikhan/pxt-escape-phone) \nis a rotary phone driver to send codes over radio. Players use\nit to send codes to the locks.\n\n* If you have a vintage rotary phone at hand, \nhere is a [guide to convert it](https://youtu.be/je-6slUD054)\n* Otherwise, numbers can be encoded as a binary sequence of A and B button presses (A = 0, B = 1)\n\n### Detonator\n\nThe [escape detonator](https://github.com/pelikhan/pxt-escape-bomb),\nis a hidden micro:bit that needs to be disabled by pressing a button\n\n* Download the program to 1 micro:bit\n\n## Room setup\n\nOnce all the micro:bit have been prepared, \nyou're ready to put it all together and get the escaping to work.\n\n## API Usage\n\nIf you plan to modify the code, here's a bit of docs.\n\n### onEvent\n\nReceived when a particular event happened on a device in the game.\n\n### onUpdate\n\nUse this function register the code that renders the current \nstate to the gizmo. If the game is lost or won, it will display\nthe correct animation.\n\n```blocks\nescape.onUpdate(function() {\n})\n```\n\n## Use this extension\n\nThis repository can be added as an **extension** in MakeCode.\n\n* open [https://makecode.microbit.org/](https://makecode.microbit.org/)\n* click on **New Project**\n* click on **Extensions** under the gearwheel menu\n* search for the URL of this repository and import\n\n## Edit this extension\n\nTo edit this repository in MakeCode.\n\n* open [https://makecode.microbit.org/](https://makecode.microbit.org/)\n* click on **Import** then click on **Import URL**\n* paste the repository URL and click import\n\n### Metadata (used for search, rendering)\n\n* for PXT/microbit\n\u003cscript src=\"https://makecode.com/gh-pages-embed.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nmakeCodeRender(\"https://makecode.microbit.org/\", \"{{ site.github.owner_name}}/{{ site.github.repository_name }}\");\n\u003c/script\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Fpxt-escape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelikhan%2Fpxt-escape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelikhan%2Fpxt-escape/lists"}