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

33 lines (27 loc) 769 B
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: // // ![Grove Base Shield v2](http://www.seeedstudio.com/depot/images/product/base%20shield%20V2_01.jpg) // ![Grove - Relay Module](http://www.seeedstudio.com/depot/images/1030200051.jpg) // // // Learn More At: // // - [JavaScript: Relay Control with Johnny-Five on Node.js](http://bocoup.com/weblog/javascript-relay-with-johnny-five/) // // @markdown