Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function PiIO() {
LinuxIO.call(this, {
name: 'Pi-IO',
pins: pins,
defaultI2cBus: 1,
defaultLed: 'LED0'
});
pigpio.initialize();
// After explicitly calling pigpio.initialize wait 100ms for pigpio to become
// ready for usage. This delay is necessary for alerts to function correctly.
// See https://github.com/joan2937/pigpio/issues/127
// Update: This issue was fixed with pigpio V63 in May 2017. When Raspbian is
// updated to include pigpio V63 the timeout here can be removed.
setTimeout(function () {
this.emit('connect');
this.emit('ready');
}.bind(this), 100);
}
util.inherits(PiIO, LinuxIO);