UNPKG

johnny-five-electron

Version:

Temporary fork to support Electron (to be deprecated)

21 lines (15 loc) 430 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { // Create a standard `led` component // on a valid pwm pin var led = new five.Led(11); led.pulse(); // Stop and turn off the led pulse loop after // 10 seconds (shown in ms) this.wait(10000, function() { // stop() terminates the interval // off() shuts the led off led.stop().off(); }); });