Skip to content

Instantly share code, notes, and snippets.

@steverob
Created December 26, 2013 13:24
Show Gist options
  • Save steverob/8133800 to your computer and use it in GitHub Desktop.
Save steverob/8133800 to your computer and use it in GitHub Desktop.
Johnny-five Strobe
var five = require("johnny-five"),
board = new five.Board();
var LEDPIN = 13;
board.on("ready", function() {
this.pinMode(LEDPIN, 1);
var val = 0;
this.loop( 100, function() {
this.digitalWrite(LEDPIN, (val = val ? 0 : 1));
});
// or
//(new five.Led(LEDPIN)).strobe(500);
});
@steverob
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment