Hacking the budweiser red light

edit: So it turns out that I found a bug in electric imp’s software. I shouldn’t have been able to register this particular imp to my own account. I will be posting an update soon on how to replace the ID chip that is included.

Shopify (where I work) happens to host the store that sells the Budweiser red light. In case you are not a hockey nut, the red light is that icon flashing red light they use to mark a goal. Budweiser sells these devices you can put up that will flash whenever a team scores a goal.

So it turns out that hacking the budweiser red light is remarkably simple. I don’t know if this trick works if you’ve already configured your light, because I tried hacking this one before setting up the way that budweiser recommends

At the heart of the red light is this little device called an electric imp. It looks like an SD card, but actually it’s a microcontroller + wifi chip. To program the electric imp you have to “blink up" which involves installing an app on your phone and using it to setup wifi and register it to your electric imp dev account.

I’m still exploring how the light works, but I got lucky and tried to toggle pin 9, which turns out is exactly the right pin to toggle! I can’t keep the light on, or turn the buzzer on myself, but setting the pin high for 2 seconds, then setting it low again causes the light to turn on and spin for a couple of seconds and buzz (unless you turned down the volume, which I did)

The electric imp consists of two pieces an “Agent" which lives in the cloud and can respond to http requests and a “device" which is the actual hardware that connects to the real world.

Here’s my code for the agent:

And here’s my code for the device

I’m probably going to write a script to poke the url whenever something interesting happens, although I’m not sure what yet. I’m also not sure how sleeping on the device works… Will it keep polling forever? Do I have to wake it up?

Happy hacking!

On Ownership

Recent revelations about the NSA, plus the shut down of my beloved google reader (RIP), have led me to become a lot more uncomfortable trusting my data to someone who isn't me. In light of that I've switched to using BitTorrent Sync for my inter computer file syncing instead of dropbox. Setting things up was pretty simple. I have 3 nodes most of the time (my home server, my laptop and my phone) and I'm working on getting a 4th hosted in a VPS somewhere so I have some offsite backup.
But the main point of this blog post is to talk about ownership. I don't like it when I don't have options as to who to trust with my data when doing something online. Email is a good example of a service that has LOTS of choices. I use gmail, but I don't have to if I don't want to. File syncing is another area that has lots of choice. I've mentioned Dropbox and Bit Torrent Sync, but there is also a ton more.
Social networking is one area that does NOT have a lot of options. I mean, yes, there are quite a few social networks, but I can't pick one and expect it to be useful unless my friends are there. This isn't the case with email (it's completely inter-operable), or file syncing (it's mostly individuals or small teams). I like the idea of diaspora and tent.io, but I'm concerned that they aren't really seeing much adoption. How come? I wish I new the answer to this. Email is basically a social network, but it is designed form the ground up to be decentralized. Facebook is the opposite of that. Was it just a matter of timing? Email was created when computers were rare, so you couldn't really trust one to be up all the time somewhere else. When facebook was launched dependable servers were not amazing. Is it just a matter of interface? A website is sort of designed to come from a single server, but there's no reason that it couldn't be like blogging.
Evernote was the cause of this post. I really really like the interface and the syncing abilities (although I REALLY wish they had a linux desktop client), but I dislike that the data has to live on Evernote's servers. I wish I could host the files on my own, or that I could encrypt my notes before they were sent to evernote. I don't mind loosing the ability to have images converted to text, and I don't think that evernote needs to index the notes to do search, since that could easily be done client side.

On Blogging


So it's been quite some time since I've published anything substantive on the the web for others to read, so perhaps it is time to change that. I'd like to document my (very early) blogging setup.
For a long time now, I've been playing with places to store information. In university I used moin moin (a wiki) to take all my class notes and the setup worked pretty well. It worked regardless of internet connection and it was really easy to share with people. I also managed to find a handy little script + exention to take notes pretty effortlessly in emacs.
But after I graduated I basically stopped using it. This was mostly due to the fact I no longer had take long form structued (and interlinked) notes.
I've also played with simplenote, but the lack of a good linux client threw me off.
At present, I am playing with evernote. I really like that they have clients for almost everything (DAMN YOU LACK OF LINUX SUPPORT!) but that is partly mitigated by two tools: geeknote, and everpad
Geeknote is a command line interface for evernote and everpad adds a nice little tray icon to ubuntu and the ability to search notes from the dash. Geeknote lets me write a little script to blog from the command line.
Another awesome tool for evernote I have discovered is called Postach.io which is allowing me to blog from evernote and the command line thanks to geeknote.
Hopefully this is the first of more posts to come on my new blog

subscribe via RSS