TinkerKit - Button
Run with:
node eg/tinkerkit-button.js
var five = require("johnny-five");
new five.Board().on("ready", function() {
// Attaching to an O* pin in a deviation from
// TinkerKit tutorials which instruct to attach
// the button to an I* pin.
var button = new five.Button("O5");
["down", "up", "hold"].forEach(function(type) {
button.on(type, function() {
console.log(type);
});
});
});
Illustrations / Photos
TinkerKit Button
Learn More
License
Copyright (c) 2012, 2013, 2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2014, 2015 The Johnny-Five Contributors Licensed under the MIT license.