Home Creators Posts Import Register Favorites Logout

Content

As the days are getting warmer (here in the UK at least - apologies to any Southern Hemispherians!) I thought I'd share an outdoors-y project, so here's a tutorial on how to create a treasure hunt or other location-based game using Bluetooth beacons. (I actually used this exact setup last Sunday for a local Easter Egg hunt I was involved in)

Unlike location-based games that use GPS for positioning (e.g. many "City Hunt"-style phone apps), Bluetooth beacons allow you to create a hunt that guides players almost anywhere.... outdoors, indoors, even underground!

An ESP32 device is used to scan for nearby beacons and, if they match the correct ID, players are presented with the next clue on an ePaper display to continue the hunt. (You could of course just use a phone app to scan for Bluetooth devices instead, but I wanted to create a thematic device which, in my case, was styled as an ancient book).

As always, I'll be uploading the code and wiring diagram to download shortly, but please ask if you have any questions!

And Happy Easter!

a.

Files

Create an EPIC Treasure Hunt using BLE Beacons

I made an outdoor location-based treasure hunt using an ESP32 and a bunch of Bluetooth Low Energy BLE beacons. Beacons are positioned at each location and broadcast a unique ID. Players are given an ESP32 device that scans for any nearby beacons, and if they match the correct ID being searched for, the ESP32 advances to the next clue. Unlike GPS systems, Bluetooth does not require line-of-sight to satellites in the sky. You can therefore position the beacons to lead your players on a hunt that goes anywhere - indoors, outdoors, even underground! There is an ePaper display connected to the ESP32 via an SPI interface, which allows clues to contain both text and images, including photographs or maps. Timings 00:00 - 01:37 Introduction and Demonstration 01:38 - 02:55 Bluetooth and ESP32 Hardware 02:56 - 04:40 Game Design Decisions 04:41 - 13:31 ESP32 Arduino IDE Code 13:32 - 14:23 Wiring Diagram 14:24 - 15:05 Wrapup For more information on this project, or and of the other playful technology projects featured on this channel, please check out https://www.patreon.com/c/playfultech or join the discord at https://discord.gg/gGhPrmNn

Comments

Abi · Lyontree

We should be called Southies and Northies! 🫣🤷🏻‍♂️

Srinath Chakrapani

where can I purchase one of those book case? would like to get one instead of 3d printed boxes.

Alastair Aitchison

(It's just cheap pine - I just rubbed some oak wood stain on it to make it look more interesting :) )

Srinath Chakrapani

thanks for the quick response. this helps. I guess the search keyword is what i was missing. waiting for the code upload!

Srinath Chakrapani

do you have a github or code sharing url? the url you shared seems to be to this post.

DougP

Hello Alastair. I recently found your videos and was instantly hooked . I've been dabbling with creating clues with Arduino, 3D printing, etc, but you've inspired me to try to up my game a bit. Can you tell me which Bluetooth app you used to inspect the beacon devices? Thank you!

Alan Klinge

Coding error for BLE location based game: either library gets an error - using Arduino BLED it gives "Compilation error: 'class BLECharacteristic' has no member named 'getValue'; did you mean 'setValue'?" - Using ESP_BLE_Arduino it gives " error: 'ringbuf_type_t' has not been declared #1100 cant get it to compile with either library.

Alastair Aitchison

You don't need to install either of these or any other additional libraries - BLE functionality is built into the ESP32 core (make sure you're selecting an ESP32 as the target device in the Arduino IDE)

Alan Klinge

Thanks for responding. Finally got it working with some Sketch tweaks. Correct combination of board manager and Node32s 38 pin.

Alan Klinge

Thanks for responding. Finally got it working with some Sketch tweaks. Correct combination of board manager and Node32s 38 pin.

Vincent ARBONA

Hi Alastair, I want to use your concept in a LARP, in order to be able to locate all the players (indoor and outdoor), using several ESP32 located at strategic places, and giving a BT beacon to each player. I'am searching for beacon references (not too expensive and with at leat medium range) do you have any reference to share ? Thanks a lot

Alastair Aitchison

Ha, thanks for the heads up.... no, I wasn't aware, and yes it does look a little inspired by this project, doesn't it?! Although that's quite the markup they're charging!

Bizzaro.

I'd say more than a little and yes, the sticker shock is real.