Home Creators Posts Import Register Favorites Logout

Downloads

Content

Hi folks! This is not an escape room puzzle as such, but this project still demonstrates ESP32, a pressure pad sensor, MQTT, and Node-RED, which are all pieces of tech that have many uses in escape rooms.... I hope you'll find it useful.

This is a tutorial project inspired by Captain Tom Moore, who is a British war veteran who has raised £30 million for the NHS by completing 100 laps of his garden and celebrates his 100th birthday tomorrow. It uses a pressure mat sensor attached to an ESP32 as a "lap counter" - sending an MQTT message to update a Node-RED dashboard running on a display screen, and playing a sound effect each time it is stepped on. 

Hardware/Software used:

 ESP32, ~$7 from, e.g. https://www.banggood.com/custlink/GvmKq6b0Rt

 Pressure mat, ~$15 from, e.g. https://www.ebay.co.uk/itm/PRESSURE-MAT-PAD-ALARM-MEDIUM-720MM-X-390MM-X-3MM-FLOOR-DOOR-BEDSIDE-SECURITY/192978582555

 Node-RED, free, from https://nodered.org/

Timings:

00:00-01:26 Introduction

01:27-01:53 Demonstration

01:54-04:24 Hardware

04:25-21:59 ESP code

22:00-37:18 Node-RED flow

37:19-38:14 Wrapup

You'll find the downloads for the ESP code and for the Node-RED dashboard attached to this post. Please ask if you have any questions!

Files

How to Create a Pressure Pad Lap Counter using ESP32 and Node-RED

This is a tutorial project inspired by Captain Tom Moore, who has raised £30 million for the NHS by completing laps of his garden and celebrates his 100th birthday tomorrow. #ThankyouNHS In this video, I'll explain how you can use a pressure mat sensor attached to an ESP32 as a "lap counter" - sending an MQTT message to update a Node-RED dashboard running on a display screen, and playing a sound effect each time it is stepped on. The concepts, hardware, and software demonstrated could be used in many puzzles and interactions in escape room puzzles. Hardware/Software used: - ESP32, ~$7 from, e.g. https://www.banggood.com/custlink/GvmKq6b0Rt - Pressure mat, ~$15 from, e.g. https://www.ebay.co.uk/itm/PRESSURE-MAT-PAD-ALARM-MEDIUM-720MM-X-390MM-X-3MM-FLOOR-DOOR-BEDSIDE-SECURITY/192978582555 - Node-RED, free, from https://nodered.org/ Timings: 00:00-01:26 Introduction 01:27-01:53 Demonstration 01:54-04:24 Hardware 04:25-21:59 ESP code 22:00-37:18 Node-RED flow 37:19-38:14 Wrapup More Info: To download the code listing and Node-RED flow for this project, or for details of any of my other Escape Room tutorials, see my Patreon account at https://www.patreon.com/playfultech

Comments

Euan Hair

Hi Alastair, love all your videos. Have you done a tutorial on how to wirelessly control an arduino on nodered? I watched your original intro where you showed the different props but I was looking for a full how to with wiring diagrams and code etc. Thanks, Euan

Robert Hank

Hi Alastair, love all your videos as always! How do I adapt this code if I want to send a message to my device (for example if I have a UI with buttons to send a "puzzleSolved" message). I'm trying to figure out the best way to configure the mqtt out node in Node-Red and how to configure my ESP32 to listen. Thanks, Robbie.

Ryan Bell

Hi Alastair, I'm pretty new to all this and is my first endeavour into the world of micro-controllers. I was wondering if would be able to help as I'm struggling to get my ESP-32 to connect to the MQTT server. Is there any steps that I need to take to be able to do this. Any help would be much appreciated. Thanks, Ryan.

Adam Hackbarth

I am unable to connect any of my devices to MQTT as well.

Luca

I have the same problem, ESP32 can't connect to MQTT server