Skip to content

Latest commit

 

History

History
71 lines (36 loc) · 975 Bytes

tinkerkit-button.md

File metadata and controls

71 lines (36 loc) · 975 Bytes

TinkerKit - Button

Run this example from the command line with:

node eg/tinkerkit-button.js
var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
  var touch = new five.Button({
    controller: "TINKERKIT",
    pin: "I0",
  });

  ["down", "up", "hold"].forEach(function(type) {
    touch.on(type, function() {
      console.log(type);
    });
  });
});

Illustrations / Photos

TinkerKit Button

docs/images/tinkerkit-button.png

Learn More

 

License

Copyright (c) 2012-2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2015-2018 The Johnny-Five Contributors Licensed under the MIT license.