-
About the project
11/26/2024 at 09:16 • 0 commentsBackground
I began this project back in 2022 and have been tinkering with it on and off for the last couple of years. It was a great test of my skills as a beginner hobbyist - I’ve had to improve my skills at 3D enclosure design, PCB design, coding and soldering along the way. I think its a fun build, but I may have rose-coloured glasses due to the time I’ve sunk into it. Your mileage may vary!
As I said in the description, I originally intended to simply recreate Sean Hodgins’ very cool Arduino Geocache Locator but found myself iterating on it as I tinkered. I really liked the idea of a physical object that is child-safe, easy to program and able to lead people through a series of checkpoints using only a physical LED display. When I realised I could use it for my friend Scott’s bucks party it gave me the deadline I needed to get it finished.
One more thing: this is the first project of this type I’ve completed since our daughter Frankie was born! It felt real good to be able to set my mind to an outside-work-and-family-hours goal and still have the energy to pull it off. There were some late nights!
The Goal
I had some starting goals in mind:
- Create a puzzlebox to lead us through a series of pubs in the inner west of Sydney.
- At each pub we would create a small puzzle to be solved by the group while we had some drinks.
- Each puzzle’s answer would be some kind of binary 8-digit sequence (ie.
10101100
). Entering the sequence into the puzzlebox would unlock a new location to visit. - Rinse and repeat!
To Operate
- Turn the puzzlebox on using the switch at the base. The LED ring will show a blue animation pattern until it gets a GPS lock where it will turn to gold.
- Once you have a GPS lock, hold down both buttons for 2 seconds to enter the password mode. The red LED turns on to tell you when both buttons are down as a visual clue something is happening*.
- When you have entered password mode a timer begins to count down on the NeoPixel ring. While it is still playing out you can enter an 8-digit binary sequence by pressing the blue and red buttons. If the sequence is correct a target is located and the compass begins to navigate. If the sequence is incorrect, or you run out of time, the gold cycle returns.
- While in navigation mode, the LEDs closest to your destination light up in the colour associated with your target. As you get closer, more LEDs illuminate. When you are standing at your target, all the LEDs will be illuminated.
All of this is a bit intentionally complex - its a puzzlebox! To make it more confusing I didn’t explain how to operate it, but instead packaged it with some baffling ikea-style instructions:
* - This LED was originally meant to be a battery indicator, but I forgot to test my circuit before printing the PCB and wired it very wrong. Luckily I’d set it to a data pin, so was able to find a use for it.
The Code
Seemed simple and I was trying to keep the ambition of the project from blowing out too much. Already I knew this would push me a bit. Originally I planned to reuse Sean’s code but soon realised I’d need my own. As I’m a beginner and got turned around a lot, I ended up restarting the project four times from scratch as I realised I no longer understood my code or could get it to do what I wanted. The final code on github is very, perhaps pedantically, broken down into parts - and I’m sure there’s still a lot of inconsistencies in how I laid it out! It includes:
- Individual handler files for the
- buttons
- compass module
- GPS module
- NeoPixel ring
- Const files for the constants and the coordinates.
- A main.cpp file to tie it all together.
To adjust the puzzlebox’s codes and target locations, just adjust the
GPS_Coordinates
items in thelocations[]
array in GPS_Coordinates.cpp. The sample code is the bar crawl we took a couple of months ago - you’ll probably want to change them!Thank you for reading!
This is my first hackaday.io project. If there’s something that doesn’t make sense or any extra files or information I should add, please let me know. If you do make the puzzlebox, or something based off it, please show me a picture! I’d love to see it!
PS big thanks to Nom for helping me with the PCBs, Dave for helping with my code when I got turned around a couple of times, Sean for the great original design and Scott & Balázs for letting me turn their bucks into a baffling ordeal. And thank you to Shak, always, forever, for running it with me, and putting up with far too much playtesting.