jperkin / node-rpio

Raspberry Pi GPIO library for node.js
856 stars 123 forks source link

Node.js Exception #174

Open wqy24 opened 1 year ago

wqy24 commented 1 year ago
var rpio = require("rpio");

rpio.init({mapping: "physical"});
rpio.open(8, rpio.INPUT, rpio.LOW);
rpio.open(12, rpio.OUTPUT, rpio.LOW);

while (true) {
  if (rpio.read(8)) {
    rpio.write(12, rpio.HIGH);
  } else {
    rpio.write(12, rpio.LOW);
  }
}

This could not work on:

Message: Segmentation fault