Skip to content

Instantly share code, notes, and snippets.

@ikr7
Last active August 29, 2015 14:05
Show Gist options
  • Save ikr7/d05371ab05efdcf180ac to your computer and use it in GitHub Desktop.
Save ikr7/d05371ab05efdcf180ac to your computer and use it in GitHub Desktop.
いいかんじ
var GPIO = require('./gpio.js');
var watcher = GPIO.watcher(50);
watcher.watch('P9_23');
watcher.on(GPIO.high('P9_23'), function(){
console.log('High!!!');
});
watcher.on(GPIO.low('P9_23'), function(){
console.log('Low!!!!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment