RTHack

Last Saturday I spent the day at JS Oxford's RTHack day. The theme was to explore and build upon real time web technologies.

When we arrived there were many examples provided for us (one which I had added) using a range of real time technologies such as Pusher, PubNub and Socket.io.

After a brief intro a few pitched some ideas they had for the day and we joined into groups. I joined with Max to work on some real time, web connected hardware using Arduino's etc. I had brought along my awesome Spark Core which is a mini, cloud connected device. I hooked up a DHT11 temperature/humidity sensor which had a handy Spark Core library available.

The data from this sensor was then made available by registering events using the Spark cloud's publish function which I then listened for on a server and forwarded all messages to Pusher for use by others. I hooked up a simple web page that would display each of the messages as they came in and cobbled together a D3 graph that plotted the temperature in real time.

We quickly discovered that the DHT11 was slow. Very slow it seemed. I first thought it was a bug in my code but after putting the device in the fridge we started to see a change in the temperature output, but with something close to a 30 second delay. Hardly real time.

I switched to using a TMP36 temperature sensor, one lacking a handy library. It took me WAY too long to get this working as I needed to find the right equation to convert the output voltage to degrees Celsius. "Hardware is hard!"

But in the end I prevailed!!!

We gave demos at the end of the day. Mine was short and sweet but some of the others were pretty cool.

Dan made a cool game where you fight to set the background colour.

Ben and Gil made a cool way of displaying what people are tweeting about.

We also had a Countdown clone, modern minesweep, twitter walls with flamingos, various chat rooms and an interactive Ben's mind palace.

When all was done and we had wrapped up a few of us headed over to Joe Perks for some well deserved (custom) cocktails.

This did end up turning into a Ruby hack...

All-in-all it was a great day! I learned not to muck around with hardware at a JS hack day (although that may change now I've received my Espruino Pico) and there are some pretty quick and powerful things you can do with technologies like Pusher.