Slide 19
Slide 19 text
Async Goodness with Buttons
!
var five = require('johnny-five');
var board = new five.Board();
!
board.on('ready', function()
{
// signal goes into arduino pin 8
var button = new five.Button(8);
!
button.on('down', function() { console.log('down'); });
button.on('up', function() { console.log('up'); });
button.on('hold', function() { console.log('holding'); });
});