Today’s Understanding Networks class was a Beacon scavenger hunt. Tom and Maria Paula hid a group of Beacons (Arduinos and Raspberry Pi) around the floor. These Beacons share the same service UUID and characteristic UUID. The assignment and challenge was to build an app that would scan, connect and read the values of these characteristics and earn points. The first team to earn 50 points unlocks the golden egg, which is the last Beacon to discover.
The game rule was to get close enough to each Beacon to claim them. Since the server that was checking this had no way of knowing the actual RSSI value any Beacon was sending to my phone, I cheated a bit by hardcoding the RSSI into my app, so I can scan and claim Beacons even if I’m not close enough. My team earned the most points but lost the golden egg, because another team had connected to it with the LightBlue app. Just shows how sometimes using readymade technology and manual labor can beat out hours of coding something automated from scratch.
The code for my app is here.
Here’s how the app worked. We didn’t have time to make an UI for the app, so I just added some alerts and appended responses in JSON to the html to understand what’s going on.
Most importantly, we all got cupcakes in the end.