UNPKG

rpio2

Version:

Control Raspberry Pi GPIO pins with node.js. Fast and easy to use.

15 lines (9 loc) 255 B
const Gpio = require('../lib/index.js').Gpio; var input = Gpio.createReadStream(32, {throttle: 100}); var output = Gpio.createWriteStream(40); input.pipe(output); process.on("SIGINT", function(){ input.end(); output.end(); process.exit(0); });