Created
January 27, 2016 16:28
-
-
Save miduku/563e5a8cdb246359aac6 to your computer and use it in GitHub Desktop.
Photon LED blink
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 config = require('config'); | |
var five = require('johnny-five'); | |
var Particle = require('particle-io'); | |
var board = new five.Board({ | |
io: new Particle({ | |
token: config.get('token'), | |
deviceId: config.get('id') | |
}) | |
}); | |
board.on('ready', function(){ | |
var led = new five.Led('D3'); | |
led.blink(500); | |
// stop dis foo' | |
this.wait(10000, function() { | |
led.stop().off(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THx!