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!

24 lines (19 loc) 425 B
var five = require("../lib/johnny-five"); var board = new five.Board(); board.on("ready", function() { var matrix = new five.Led.Matrix({ pins: { data: 2, clock: 3, cs: 4 } }); matrix.on(); // type `draw("shape_name")` into the repl to see the shape! this.repl.inject({ matrix: matrix, draw: function(shape) { matrix.draw(five.Led.Matrix.CHARS[shape]); } }); });