Skip to content

Reverse Geocache using an ESP32 with MicroPython

Notifications You must be signed in to change notification settings

Joozt/ReverseGeocache-ESP32-MicroPython

Repository files navigation

Reverse Geocache using an ESP32 with MicroPython

A reverse geocache is a present in a box that only opens at a certain physical location. Finding the location requires a little puzzling, because the box will only show the distance to the location. Normally a geocache is a treasure hunt puzzle that brings you to a location where you find a hidden container, but with a reverse geocache you bring the container with you.

Reverse Geocache box

The original idea comes from Mikal Hart and several clones can be found around the internet. This variant is inspired by the other reverse geocaches, but is implemented in MicroPython on an ESP32 microcontroller.

Parts

Reverse Geocache inside

Lock servo Lock

Working

After building the box, the present can be put inside. Before wrapping it in gift paper, the button has to be pushed once. This will engage the lock.

When the present is unwrapped, the person doesn't know what it is and will push the button. It will show a welcome message and play a tune. Then it will start searching for GPS signals. It will search for 5 minutes before turning off. During the next attempts it will show a message that you have to be patient and even outdoors it can take a couple of minutes.

When a GPS signal is found, it will show the distance to the destination (10m precision). It will keep updating the distance when moving, but it will turn off after 1 minute to make it is not too easy to find the destination. The LED from the GPS receiver will start blinking, which can be positioned in front of a LED lens/cap so that it is visible to the user.

It shows how many attempts were made. Maximum 50 attempts are allowed. After 50 attempts it shows a failure message and play a sad tune. But after waiting 10 seconds the program continues, so that it is still possible to find the destination and unlock the box.

When the distance is less than 20 meters from the configured destination, it will show that the location is found and the next location has to be discovered. The person doesn't know how many locations will follow, but the number of remaining attempts keeps decreasing.

After the second destination has been found, the puzzle is complete. It will open the lock, play a winning tune and display a congratulations message. After that it will show a greetings message and turn off after 1 minute.

After completing the puzzle, next time it is turned on it will immediately play the winning tune, display the congratulations and greeting messages and turn off.

YouTube

Schematic

Schematic

Messages

Welcome Attempt No signal Be patient Distance First completed All completed Greetings Failed