johnny-five-electron
Version:
Temporary fork to support Electron (to be deprecated)
24 lines (19 loc) • 425 B
JavaScript
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]);
}
});
});