Created
February 7, 2014 20:52
-
-
Save bjallen/8871616 to your computer and use it in GitHub Desktop.
node script for controlling leds on my raspberry pi
This file contains hidden or 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 gpio = require('gpio'); | |
var green = gpio.export(4, { | |
direction: 'out', | |
interval: 200, | |
ready: function() { | |
console.log('green is ready'); | |
} | |
}); | |
var yellow = gpio.export(17, { | |
direction: 'out', | |
interval: 200, | |
ready: function() { | |
console.log('yellow is ready'); | |
} | |
}); | |
var red = gpio.export(22, { | |
direction: 'out', | |
interval: 200, | |
ready: function() { | |
console.log('red is ready'); | |
} | |
}); | |
module.exports.green = green; | |
module.exports.yellow = yellow; | |
module.exports.red = red; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment