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, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!
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