Callback with empty string on tag remove
node.js module to access a rfid reader with rc522 chipset which is connected a raspberry pi
https://github.com/ocsacesar/rc522 modified for accessing i2c version such as RC522 I2C V1.1 and reworked to async addon based on https://github.com/paulhauner/example-async-node-addon
Update: you can now configure which pin is connected to RST Pin and which i2c address is used.
This node module is to access RFID reader with a rc522 chipset (e.g. link to ebay) via GPIO interface of the raspberry pi.
The module is currently only able to read the serial number of the tag which is hold onto the reader.
var rc522i2c = require("rc522-i2c");
console.log('Ready!!!');
// pin RPI_V2_GPIO_P1_37 see bcm2835.h, i2c-address,callback
rc522i2c.getSerial(26,0x28,function(rfidSerialNumber){
console.log(rfidSerialNumber);
});
Save and run: (Is necessary "sudo")
sudo node rfid.js
NOTE: Running as root