A drink mixing machine with JS

 

 

Andre Garzia (@soapdog)

The Science behind mixing drinks?

Web Interface

 

vue.js, webpack, pug

Backend

 

NodeJS, Tiny Router

Pump Control

 

Tessel API, GPIO

100% JAVASCRIPT

RECIPES

[

]

,

,

,

pumps =

[ 0, 70, 120, 0]

cuba libre   =

[ 70, 0, 0, 120]

Hi Fi   =

Tessel 2

(webdevelopers <3 hardware)

Tessel 2

  • MIPS 580mhz (your app runs here)
  • 48mhz SAMD co-processor (realtime, arduino)
  • 64mb RAM
  • 32mb Flash
  • 802.11 b/g/n wifi
  • Ethernet
  • 2x USB
  • 14 pins (GPIO, I2C, etc)

What does it look like?

// Import the hardware library
var tessel = require('tessel');

// Turn a LED on before the loop.
tessel.led[2].on();

// Blink!!!
setInterval(function () {
  tessel.led[2].toggle();
  tessel.led[3].toggle();
}, 100);

console.log("Pisca! (Press CTRL + C to interrupt)");

Development Workflow

  • Plug the board.
  • Try scripts using T2.
  • Write final version.
  • Upload final version.
  • Done.

Why the Tessel is cool?

  • It is JavaScript!
  • It is JS IN A TINY BOARD!!!
  • Favors iterative learning.
  • High Level API.
  • Very active community!

Me, when code works

  • andre@andregarzia.com
  • http://andregarzia.com
  • http://twitter.com/soapdog

 

 

Making a Drink Mixing Machine

By Andre Garzia

Making a Drink Mixing Machine

A talk about drink mixing with Tessel

  • 1,024