Created
August 5, 2012 02:40
-
-
Save mapmeld/3261217 to your computer and use it in GitHub Desktop.
Server-Makes-Motor-Run
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
// CfA Liberty Bell Project | |
var http = require('http'); | |
var five = require("johnny-five"); | |
var board = new five.Board(); | |
board.on("ready", function() { | |
http.createServer(function () { | |
console.log('Hey!'); | |
var motor = new five.Led(2); | |
motor.on(); | |
board.wait( 500, function(){ | |
motor.off(); | |
}); | |
}).listen(process.env.PORT || 3000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment