Makey Button
Inspired by the awesome MakeyMakey, this GPIO driver allows you to connect a 10 MOhm resistor to a digital pin on your Arduino or Raspberry Pi to control your robots with bananas, clay, or drawable circuitry.
For more information click here.
How To Connect
Cylon.robot({ connections: { arduino: { adaptor: 'firmata', port: '/dev/ttyACM0' } }, devices: { makey: { driver: 'makey-button', pin: 2 } }, });
How To Use
var Cylon = require('cylon'); Cylon.robot({ connections: { arduino: { adaptor: 'firmata', port: '/dev/ttyACM0' } }, devices: { makey: { driver: 'makey-button', pin: 2 } }, work: function(my) { my.makey.on('push', function() { console.log("Button pushed!"); }); } }).start();
Events
push
Emitted when the Makey Button is pushed
release
Emitted when the Makey Button is released