You’ve got a fancy instant espresso maker but you miss talking to your barista? Crisis averted, Ninja Blocks & Twilio are here to help.
We made this hack as a bit of fun for the recent TwilioCon conference in San Francisco. It might not be 100% practical, however it is a great demonstration of how easy it is to create high-level apps with the Ninja API.
Lets take a look at how we did it.
We connected 3 wired relays (made with the the Ninja Breakout Kit) to the buttons of the machine (an Espressi, which is a $79 Nespresso knockoff).
Certainly not the most elegant solution, but it does look cool. Also by using standard relay boards they just pop up on the Ninja dashboard automagically when they are plugged in. We then used the dashboard widgets to toggle them and figure out which is which so we could give them meaningful names.
Using the Ninja Blocks node library and the Twilio node library there really isn’t much too it. Because its a hack we just hardcode our Ninja API token (which means no messing with OAuth) and Twilio credentials.
The only slightly tricky part was “pressing” the buttons because the machine uses long presses for programming. You’ll see we press the buttons for a second to turn it on and make the coffee and for 5 seconds to turn it off.
We have ordered 1000 Ninja Blocks (announcement coming soon), be the first to know when they are available for sale by filling in this form.
I hoped you enjoyed seeing this hack as much as we enjoyed making it. Let us know in the comments or on the forums what you’d like to hack (or us to hack on your behalf) – Ninja or otherwise