Hack24: Flaming Background Righteous Fist Business Fish
A Hack24 Story
A couple of weeks ago I competed in Hack24, a hackathon held in Nottinghams’s Council House.
We went into the 24 hour hackathon intending to go for 2 of the sponsor challenges: Unidays and Packed Pixels.
The Unidays challenge was so somehow integrate a a song into your hack. Most people, including us, chose to make the name of our hack some kind of pun in a popular song title.
The Packed Pixels challenge was to make a hack with a price of hardware that was integral to the functionality of the hack.
Inspired by these challenges, we came up with MAC:ARENA.
The original concept behind MAC:ARENA, conceived the night before the hack began, was a game in which you ‘collect’ the MAC addresses of your Bluetooth devices by connecting different devices via Bluetooth to a BBC Micro:Bit.
On connection of a new device the Micro:Bit stores that unique address up to a limit of 4 addresses (only for as long as it’s powered, unfortunately).
Two players may bring their Micro:Bits to the MAC:ARENA once they’ve collected 1 or more addresses.
The MAC:ARENA is a Raspberry Pi 3 computer wired up to a receipt printer.
With the competing players Micro:Bits connected to the Pi via Bluetooth, the Pi uses the players choose MAC Address as a seed to generate a Mac Monster from a wide range of combinations of body parts.
Joe is a good artist, so his task was going to be making those individual body parts (as well as the final video).
Each MAC generates a different monster with different stats, but will always generate the same monster.
The Pi then prints the two competitors monsters and plays out a Pokemon style battle on the receipt printer. Complete with sound effects masterfully generated in a similar way to the body parts, procedurally, based on the MAC address used utilising PureData by Dexter.
A simple concept. That can’t be TOO hard, right?
Unfortunately things didn’t go to plan.
On arrival to the hack we spent way too long working on the Micro:Bits trying to get Bluetooth to even connect properly to another device. Only to find that the Bluetooth API doesn’t provide an interface to the connected devices MAC Address. 😣
Switching gears, we broke out the Raspberry Pis we had and the USB Bluetooth adapters for them.
With the intention of using them as the devices to collect and store the Bluetooth MAC addresses, we jumped into the afternoon.
By midnight Saturday, we’d barely made progress. This was almost entirely down to struggling to connect too and test code on the Pis. We had to run a network switch and portable router (to behave as DHCP Server) to allow us connect to the Pis over SSH. However, the router was flaky, often refusing to hand out IPs. This meant many frustrating hours of (mostly Lex) unplugging and resetting the router to try and get it to work.
We also had some trouble being able to download Python modules and their dependencies onto the Raspberry Pis. This spurred a couple of visits home just to use internet with more than a couple of carrier pidgeon’s worth of bandwidth.
Without being able to test code on the Pis we couldn’t test or even write our code for the MAC:ARENA since the receipt printer needed to connect over serial via GPIO on the Pi.
We did manage to work on the code for the clients (i.e what WAS going to be Micro:Bits) because I could run that code on my laptop, since it has a Bluetooth chip.
At around 1:00am Sunday morning, we all went our separate ways towards home to get some sleep.
Myself and Lex went home and stayed up a few hours more to make use of an actually reliable internet connection and a working local network to get some useful things done on the Pi.
Returning in the morning, we got to work finishing what we’d got.
By the midday cut off time of the end of the Hack we’d put together most of the hack, just not in a way that all the parts talked to each other.
We’d got the bluetooth clients working on my laptop, utilising an LED Matrix to display MAC addresses captured and allow the user to select if they wanted to keep the address or not.
We also had the receipt printer working, printing monsters generated using a MAC address.
As well as that, we had a great selection of PureData sound effects creating ‘roars’ for each and every unique MAC address.
Hack24 awards prizes in an interesting way. Unlike most hackathons, you don’t have to present your work on a stage. Instead you have 2 hours to make a short video to sell your hack to the judges.
It can be a serious or as ridiculous as you like. As long as its clear what challenges you were trying to target.
We had Joe. So obviously our video was more on the silly side.
We were up against some amazing other entries. Some that hit the briefs much better than we did.
However, to at least my surprise, we won something!
We were lucky enough to win the Unidays prize for best song title tie-in with MAC:ARENA.
Certainly a great achievement considering that most of the other teams also entered this challenge, compared to other challenges with only a handful of teams entering each of them.
We were also nominated for the Packed Pixels Hardware Hack challenge. Although we didnt win, we’re still pretty proud that we were even considered!
We had a great time. Despite spending a lot of time stressed due to bad internet, hardware being as horrible and flaky as you’d expect and general hackathon madness.
I’d like to thank the other competitors for coming up with some seriously good hacks. And of course, the organisers of Hack24, Emma and Andrew along with all the other 10s of organisers, volunteers and sponsors. You did a great job!! We thank you for the opportunity.
We’re very proud of what we built. I certainly want to take this further and actually complete the thing as we intended it to be. But we’ll see if I ever have time to do that.