Skip to content

Instantly share code, notes, and snippets.

@reconbot
Forked from voodootikigod/strobe.js
Last active June 7, 2016 03:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reconbot/fb19742228aaf8c766d6bf2883a6fd3f to your computer and use it in GitHub Desktop.
Save reconbot/fb19742228aaf8c766d6bf2883a6fd3f to your computer and use it in GitHub Desktop.
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
// Create an Led on pin 13 and strobe it on/off
var led = new five.Led(13)
// Optionally set the speed; defaults to 100ms
led.strobe(100);
});
const { Board, Led } = require("johnny-five");
const board = new Board();
board.on("ready", () => {
// Create an Led on pin 13 and strobe it on/off
const led = new Led(13)
// Optionally set the speed; defaults to 100ms
led.strobe(100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment