Created
December 26, 2013 13:24
-
-
Save steverob/8133800 to your computer and use it in GitHub Desktop.
Johnny-five Strobe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Circuit Diagram
http://i.imgur.com/BcRk5vb.png