Skip to content

Instantly share code, notes, and snippets.

@alepez
Created October 29, 2013 11:33
Show Gist options
  • Save alepez/7213057 to your computer and use it in GitHub Desktop.
Save alepez/7213057 to your computer and use it in GitHub Desktop.
var gpio = require("pi-gpio");
gpio.open(11, "input", function(err) { if (err) { console.log(err); }});
setInterval( function() { gpio.read(11, function(err, value) { console.log("value:", value); }); }, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment