UNPKG

johnny-five

Version:

The JavaScript Robotics and Hardware Programming Framework. Use with: Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, Raspberry Pi, Spark Core, TI Launchpad and more!

13 lines (10 loc) 270 B
var five = require("../lib/johnny-five.js"); new five.Board().on("ready", function() { var pin = new five.Pin(5); // Event tests ["high", "low"].forEach(function(type) { pin.on(type, function() { console.log("Circuit Event: ", type); }); }); });