johnny-five-electron
Version:
Temporary fork to support Electron (to be deprecated)
33 lines (27 loc) • 769 B
JavaScript
var five = require("../lib/johnny-five");
var Edison = require("edison-io");
var board = new five.Board({
io: new Edison()
});
board.on("ready", function() {
// Plug the Relay module into the
// Grove Shield's D6 jack.
var relay = new five.Relay(6);
// Manually control the relay
// from your terminal!
this.repl.inject({
replay: relay
});
});
// @markdown
// For this program, you'll need:
//
// 
// 
//
//
// Learn More At:
//
// - [JavaScript: Relay Control with Johnny-Five on Node.js](http://bocoup.com/weblog/javascript-relay-with-johnny-five/)
//
// @markdown