Home Creators Posts Import Register Favorites Logout

Content

Here you'll find the additional Patreons-only information to accompany the "Cut The Wires" Bomb Defusal project.

You can download the code for the Wemos D1 Mini (the bomb itself), the Node-RED flow, and the wiring diagram from the following Google Drive link: https://drive.google.com/drive/folders/1SbVHmepVkb4R7XzyeBJCQZs9QO8J8t2i?usp=sharing

The Arduino which is controlling the DMX lighting is running code from my existing Node-REDscape GitHub page, here: https://github.com/playfultechnology/node-redscape/tree/master/Arduino/DMX

If you'd like more information or help setting up Node-RED and DMX, I encourage you to watch my previous video on the topic at  https://www.youtube.com/watch?v=nPNFbN80pSg , or to check out the WIki page at https://github.com/playfultechnology/node-redscape/wiki/Controlling-DMX-Devices

Links to Resources Used

Wemos D1 Mini, ~$2.50 from e.g. https://www.banggood.com/custlink/v33RJLItSj

TM1637 4-digit LED display, ~$3 from e.g. https://www.banggood.com/custlink/GDD3zSq2qk

Arduino UNO, ~$3 from e.g. https://www.banggood.com/custlink/KD3ErLZzY9

Conceptinetics DMX shield, ~$20 from e.g. 

https://www.tindie.com/products/Conceptinetics/25kv-isolated-dmx-512-shield-for-arduino-r2/  (other shields are available - e.g. https://thepihut.com/products/dmx-shield-for-arduino. It's also possible to create your own DMX shield using a MAX485 chip, as explained at https://playground.arduino.cc/DMX/DMXShield/ )

RGB Stage Lighting Cans with DMX interface: £70 for 4 - https://amzn.to/34yeHA3

Node-RED - https://nodered.org/

Please ask if you have any problems accessing the above or have any other questions/comments!

Comments

To the Son I never had (edited)

Comment edits

2026-09-07 18:00 Hi Alistair, i appreciate this is a good few years old but i recently found this on Youtube and loved the idea for our local scout group. Anyway, i have got the boards and the timer and have written the code to the board. when i launch with the board connected is simply get: Compiled: Mar 15 2023, 17:22:09 ....?dO|W�$hX�Dz��|���hb2�CutTheWires.ino Do you have any idea what i might have done wrong? I do get an error when verifying which is specific to the device code as it appears C++ no longer accepts the singular code line. My main issue is that the clock does not come on at all like it isnt being powered up.
2023-03-15 17:30

Escape Augusta

Greetings Alistair. This is such a fun puzzle with lots of possibilities! Hi everyone. I am using this to create a puzzle for our escape room. I started with your code but tweaked it to suit and UnoR3, and I cut a lot out because I'm not using LED lights, WiFi, and special effects lighting. I added in 4 sound files using TMRpcm library to use during different stages. I have it working almost perfectly, except the end result of "defusing" the bomb happens no matter the order of the 4 correct wires. I have 5 wires available in Pins 2, 3, 4, 5, 6, with only 4 needing to be cut, and of those, I did specify in the beginning of my code what the order should be: // 0 indicates the wire should not be cut int wiresToCut[numWires] = {0, 1, 2, 3, 4}; Any ideas on how to tweak my code so it ONLY defuses when wires from Pins 3, 4, 5, then 6 are cut in that exact order??? Thanks in advance for any help!

Fabien Vanmairis

Bonjour Alastair ! ce puzzle est tout simplement génial mais impossible d'avoir le code arduino aurais tu un lien pour le telecharger ? merci d'avance

Christian Kalisch

hallo Alastair, Is there a way to operate the circuit without mqtt

Avi

Hey Alastair! I'm looking for the ARDUINO CODE for the DMX lighting, I don't see it published on the github page.

Giovanni Gentile

Same issue for me I'm looking for the Arduino UNO code for the DMX lighting by serial connection...the github page doesn't exist and the only code in the package is only the wemos code

Polo Roset

Hi, thanks again for this cool project. When I try to Check the code in Arduino IDE, I've got this message : "In function 'void setup()': CutTheWires:133:18: error: expected primary-expression before '=' token SEG_A | SEG_D, = ^ CutTheWires:134:18: error: expected primary-expression before '=' token SEG_A | SEG_D, = ^ CutTheWires:135:18: error: expected primary-expression before '=' token SEG_A | SEG_D, = ^ CutTheWires:137:3: error: expected primary-expression before '}' token }; ^ exit status 1 expected primary-expression before '=' token " I have all the dependices installed (Pubsub & TM1637). I certainly miss something ...

Polo Roset

Yeah ! It work. Thanks for the quick reply !

Polo Roset

Hi, I experienced a bug when I increase the penalty Time : When I cut a wrong wire the detonation Time jump to a very High value and jam the "currentTime >= detonationTime" test. I think unsigned long won't accept negative value. I changed them to "long" and now it's working.

Mecha

Hi! Thank you for sharing this! I had a few Wemos controllers laying around and decided that this build would be great for a small escape room I am building for Halloween. But I did not plan to use the sound/light effects or the mqtt. I would really like to to work as an isolated piece, and have tried modified the code to the beat of my knowledge but I do not get it to work. Would it be to much to ask if you could help med and point me in the right direction to make this prop work as an isolated prop? Thanks again!

Peter Serneels

Hi, Thanks for making this project available. Where can i download the schematics for the wiring? I'm not familiar with .fzz files and cannot open them. Can you shre the schematics in jpeg/pdf format?

Andrew O'Brien

How would you adjust the code or setting if you were just using the arduino board without the lights and just wanted the countdown and time penalty? I want to use it as a self contained prop

Adam Hackbarth

how do you upload the code into the Arduino ide it says it needs to be .ino or .pde?

Adam Hackbarth

Oooo okay thanks I was able to figure it out. Greatly appreciate the quick response. Sorry pretty new to all this.

Adam Hackbarth

Hey Alastair I was wondering if you could help with another problem. How do you find the SSD and the WIFI password for the ESP8266? I've looked everywhere on the web and no one has an explanation.

Adam Hackbarth

Okay great that's an easy fix. Its always a lot easier of a fix than I anticipate. Thanks again for the detailed information. I'm getting pretty close to finishing this project. Also just sharing some information. I had to download a specific driver "CH203" to get my com port to open. Also the board for ESP8266 wasn't in my boards options. I had to input a specific website in the setting tab for it to show up in the downloadable search option. I'm confident you can solve all of these small issues. For a newb these hurdles took a while to solve. Thought I would share just in case it was any help for future videos.

Timothy Riseborough

Hi Alistair, I am using your puzzle as an 'alarm' instead of a bomb and if they get it wrong, it deducts time off the room timer (which I now have running on Node-Red) - so far so good :) however, a screen wouldn't really fit in my room very well so I was hoping to be able to project the timer onto a LED display on another D1 mini that could be in a handheld package... Do you have any top tips on how to get started with this? (As I said, I currently have the timer on the node-red dashboard so I can see it - can I send this over mqtt every second?) Thanks in advance, Tim

Adam Hackbarth

How do you start the bomb? The LCD screen is all zeros so I know that works. Im connected the MQTT broker. The wifi is also connected. I thought the bomb starts when it turns on?

Adam Hackbarth

In the serial print out it says the wires are connected and the bomb is activated. The timer isnt counting down. Do you know what might be happening?

Adam Hackbarth

The first thing I do is open the serial monitor with the USB connected to the ESP 8266 running on port 5. It has following print out below. At first it does say MQTT is not connected. Below I explain further why this is happening. At this point I don't have node red and MQTT running. Could not connect to MQTT server, rc=-2 ⸮HpxWAMMM⸮?8⸮tO⸮??x⸮⸮hBombUpDated.ino Compiled: Jun 9 2021, 15:33:47 ........done. IP Address: 000.000.0.000 Wire 0 pin(13) :Connected Wire 1 pin(12) :Connected Wire 2 pin(14) :Connected Wire 3 pin(5) :Connected Bomb activated! Could not connect to MQTT server, rc=-2 Step 2 Then I run node red in the command prompt. In my command prompt it says the following. Microsoft Windows [Version ] (c) Microsoft Corporation. All rights reserved. C:\Users\adamh>node-red 10 Jun 11:49:30 - [info] Welcome to Node-RED =================== 10 Jun 11:49:30 - [info] Node-RED version: v1.3.3 10 Jun 11:49:30 - [info] Node.js version: v14.16.1 10 Jun 11:49:30 - [info] Windows_NT 10.0.0000 x64 LE 10 Jun 11:49:32 - [info] Loading palette nodes 10 Jun 11:49:35 - [info] Dashboard version 2.29.0 started at /ui 10 Jun 11:49:35 - [info] Settings file : C:\Users\adamh\.node-red\settings.js 10 Jun 11:49:35 - [info] Context store : 'default' [module=memory] 10 Jun 11:49:35 - [info] User directory : \Users\adamh\.node-red 10 Jun 11:49:35 - [warn] Projects disabled : editorTheme.projects.enabled=false 10 Jun 11:49:35 - [info] Flows file : \Users\adamh\.node-red\flows_LAPTOP-000000.json 10 Jun 11:49:35 - [info] Server now running at http://000.0.0.0:1880/ 10 Jun 11:49:35 - [warn] --------------------------------------------------------------------- Your flow credentials file is encrypted using a system-generated key. If the system-generated key is lost for any reason, your credentials file will not be recoverable, you will have to delete it and re-enter your credentials. You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change. --------------------------------------------------------------------- 10 Jun 11:49:35 - [info] Starting flows 10 Jun 11:49:35 - [info] [mosca in:6fcfd2a5.a6a7ac] Binding mosca mqtt server on port: 1883 10 Jun 11:49:35 - [error] [mosca in:6fcfd2a5.a6a7ac] SchemaError: Expected `schema` to be an object or boolean 10 Jun 11:49:35 - [info] Started flows 10 Jun 11:49:35 - [info] serial port COM5 opened at 9600 baud 8N1 10 Jun 11:49:35 - [info] [mqtt-broker:MOSCA] Connected to broker: mqtt://localhost:1883 After I run node red I can no longer open my serial monitor on the Arduino IDE because node red and the serial port are both using port 5. Therefore I can only have the serial monitor open or have node red connected. Because my command prompt says its connected to the broker and node red says its connected to the broker I believe I can assume its connected to MQTT.

Adam Hackbarth

When I try to open the serial monitor on the Arduino IDE while its connected to node red it tells me the port is busy. The code for the serial monitor print out for the wires connected is on line 145.

Alastair Aitchison

So, with the Node-RED Arduino serial out node removed, you're able to have the serial monitor window open, and you get the rc-2 error, but nothing afterwards? You're not getting the "connected" or "activated" messages any more that you were before? And what now happens when you try to "cut" the correct wire? Does it generate an MQTT message to Node-RED?

Timothy Riseborough

Hi Alastair, I have modified the cut the bomb puzzle into an alarm panel that needs defusing, it would be useful to see which wires they have cut on node-red, however, the publish function doesnt seem to like (i) because it's an integer... what is the best way around this? (Code below for reference) for(int i=0; i

Lee Broad

Wired as per your fritzing, but the serial monitor says they are all cut whether cut or not. The wires don't have voltage, so how are they being read by the digital pins as high or low?

Lee Broad

To a degree yes. Is there any way you can contact me by phone so I can explain exactly what’s happening or not happening at my end please

Chris Grant

Hi Alastair. I hope you're keeping well and happy new year! I've just tried to download the code from your link above but all I can see are two jpgs and a fzz file. Am I being daft? Is it possibly to do with google drive that I can't see them? Cheers!

Chris Grant

Alastair, I just realised this and went on to delete my post but you've been ever so efficient at replying! Thank you so much and apologies for my stupidity!

Chris Grant

Sorry Alastair, me again. I've put together your design using a non-wifi uno as the way this project will be used is a bit more portable and not necessarily near enough to a node red controlled effect. One thing I've been trying to do is have a passive buzzer bleeping as the timer ticks down and making a more solid noise when the timer runs out or the device is deactivated. What I can't work out is where to add the line to make the buzzer bleep in time with the timer. Would you mind giving some advice please?

Seth T. Graves

Hello Alastair and thank you for the awesome setup. I, like a couple of others in this thread, are curious about having a stand-alone unit, removed from the network. I am assuming that there is a fairly significant change in coding? Any assistance would be greatly appreciated.