techniq / node-pn532

Native Node.js driver for the PN532 NFC chip
70 stars 31 forks source link

Pass required callback function for i2c write #16

Open cthayer opened 6 years ago

cthayer commented 6 years ago

i2c library requires a callback function when calling the write function.

Passing a noop function to avoid the following error when initializing the i2c reader:

.../node_modules/i2c/lib/i2c.coffee:88
          return callback(err);
                 ^

TypeError: callback is not a function
  at Immediate.<anonymous> (.../node_modules/i2c/lib/i2c.coffee:54:9)
  at runCallback (timers.js:672:20)
  at tryOnImmediate (timers.js:645:5)
  at processImmediate [as _immediateCallback] (timers.js:617:5)