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!
21 lines (15 loc) • 430 B
JavaScript
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();
});
});