Dropbox Hackathon

This weekend I attended Dropbox’s London hackathon which was a great way to get introduced to their APIs and get a feel for the kind of people who work there. The venue was jam-packed with over 120 hackers and the pretentions kicked off with some really interesting demos using the Dropbox API to translate American English to British English and using their new webhooks API. Unfortunately Dropbox got a bit unlucky with the venue as it was quite small for the amount of people and the lighting really made it feel more like a nightclub rather than a hackathon, giving all screens a pretty horrible yellow tint. The venue also was not open all night which is unheard of from a hackathon, but luckily we had our offices to go back to during the night to continue hacking.

The Dropbox team however were fantastic and were always happy to jump off their seats to lend a hand when needed. Their APIs are solid and well documented which is great for hackathon environments and a pure front-end JavaScript API is always a winner for beginners. I personally learnt about the Dropbox Core API which allows you to build applications which has access to a dedicated folder Dropbox generates for you. This is great for using Dropbox as storage for your apps without users surrendering all their data to you.

Our SD card hack

Our hack was to build a way of automatically syncing pictures from a DSLR camera to Dropbox which would allow photographers at events to live-tweet the event without carrying around a laptop and running between taking pictures and uploading them.

This also solves the problem of storage space as we would no longer be eating up the limited memory of SD cards or backing up pictures altogether. This is a recent problem I have found after buying an DSLR camera and taking them to events; tweeting them live isn't an option and it’s days before I take time out to upload them to flickr.

Sidd and Uroš worked on the mechanics of building a SD card which could be used by two devices at the same time. The solution was to strip out two SD cards and insert one end to the camera and the other to the Raspberry Pi. We then had another SD card in the middle which was used as the actual storage of the images.

Unfortunately this idea did not work as it is not possible to have 2 devices talking to the same SD card at the same time. However a workaround was to have both devices reading and writing data to the bridged SD card on their own, so turning off the camera would allow the Raspberry Pi to access the SD card where it would upload all the images to Dropbox.

Adding the Raspberry Pi

While the SD card part of our hack was being worked on I was learning about running Bash and Python scripts on the Raspberry Pi and installing a headless version of Dropbox onto the device to upload the images through the Dropbox Core API.

I built an app through Dropbox which gave me a folder for API access to read and write to and followed some brilliant instructions I found on programmatically uploading the images to Dropbox.

This was the first time I had ever used Bash scripts or wrote Python on the Raspberry Pi, so I learnt a lot! Luckily I had a borrowed Wi-Fi dongle from the Kano kit which stores network settings onto the device magically and remembers them even when you connect them to a brand new Raspberry Pi, so setting up the Wi-Fi on my Pi was easy too.

Now that images were being synced to Dropbox we needed to prove it in a way which was a lot more interesting than simply showing a folding being populated in a file explorer. This is where we integrated IFTTT which was automatically posting all new files in Dropbox to twitter through a new account we set up under DropboxLive. Eventually we were sending too many pictures for Twitter to accept and Usman ended up creating another twitter account called DropboxLive2 to use moving forward and set a timer to stop spamming Twitter.


To our amazement we managed to win the ‘most impressive technical hack’ achievement which was quite something as we were up against a lot of amazing hacks such as a team who managed to build an entire 3D scanner which uploaded the modals to Dropbox. During our demonstration we were using the camera to show it syncing images to Dropbox and tweeting them out automatically which was a really nice seeing working live on stage! Definitely one of our coolest hacks.