isr.js: add node.js isr example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
10
examples/javascript/isr.js
Normal file
10
examples/javascript/isr.js
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var m = require('mraa')
|
||||
|
||||
function h() {
|
||||
console.log("HELLO!!!!")
|
||||
}
|
||||
|
||||
x = new m.Gpio(14)
|
||||
x.isr(m.EDGE_BOTH, h)
|
||||
Reference in New Issue
Block a user