We wanted to build something other than a web service, so we came up with a neat game idea where someone would plant a bomb (a raspberry pi), and another person/group of people would use a locator app on their phone to try and find it using only beeps.

What it does

The Raspberry Pi sends its location to a database periodically, and our locator app queries that location and calculates the distance to it.

How I built it

We could have opted to broadcast a wifi signal from the pi and use that signal alone, but using Google's Location services allowed us to take advantage of the robust KU wireless network and allow for a much greater range than one wifi transmitter alone could provide.

On the Raspberry Pi, we query Google's Geolocation API with a list of Access Points in range, and Google utters some incantations to give us back a latitude and longitude for the Pi. The Pi then uploads this data to a Firebase real-time database, and the locator app (using location services for Android) can query this database to compare its own location to the Pi's.

Challenges I ran into

Choosing the stack for this app was the greatest challenge in this project, and took us a large chunk of time. We didn't know which database to use, or if we should use a notification system instead. After many hours of getting nowhere with Firebase Firestore and Firebase Cloud Messaging, we finally saw success using the Firebase Realtime database.

Writing Android apps in Kotlin is difficult, especially for beginners. We've been having so much trouble with it that it still doesn't work.

Finally, configuring the Raspberry Pi operating system was a challenge, especially because we had to set it up headless. Getting it connected to a network was a pain, and we still cannot get it to connect to the JAYHAWK network.

Accomplishments that I'm proud of

Figuring out how Google's geolocation services work was really neat, and getting an accurate measurement of the Raspberry Pi's location using only wifi networks was impressive. Also, finally interacting with a database and watching it update in real time with the Pi's location was gratifying.

What I learned

I learned how Google's geolocation services make use of wifi networks, and how I can make use of them, too. I also learned that Firebase is really hard, and that Android development is really hard. I think I'm going to get an Android book after this.

What's next for Keep Searching and Nobody Explodes

Two essential components of the project do not work. The locator app is not functional and the Pi won't connect to the campus network. This game could be very fun and interesting, we just need to get it up and running!

Share this project: