Our favorite number is 1 (or 0)

Knock, knock? Hiding JS Functionality With a Secret Knock


12.08.11 Posted in Blog, News by

qualcomm wallRecently Automata was tasked with building software for an iPad-based installation. It featured 24 iPads arranged in an 8 x 3 grid secured into a cabinet. Due to many factors, including a very short deadline, we quickly determined that HTML5 + a kiosk app was the way to go. The problem was the iPads were very firmly secured into the cabinet with no easy way of resetting them or pushing the home button. We needed a way to reload the app in case any issues popped up in the field.

As I was mulling the problem I remembered reading in Make magazine about an Arduino based door lock that would listen for secret knocks. Only if the person knocked on the door at the correct rhythm would the Arduino unlock the door. I realized that this same concept could be applied to JavaScript with the added bonus of making each knock have to be on a particular area of the screen.

The actual porting of the Arduino C code over to Javascript was quite painless and the final ended up working exceedingly well. If you’re interested in the code for your own use or just to take a look at how it works, we’ve posted it up as a gist on GitHub – knock.js (It’s a require.js / CommonJS module)



Leave a Reply