Skip to content
forked from ocsacesar/rc522

node.js module to access a rfid reader with rc522 chipset which is connected a raspberry pi via i2c

Notifications You must be signed in to change notification settings

epike/rc522-i2c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RFID RC522 on Raspberry PI with NodeJS (I2C version)

node.js module to access a rfid reader with rc522 chipset which is connected a raspberry pi

Fork of

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.

Purpose

This node module is to access RFID reader with a rc522 chipset (e.g. link to ebay) via GPIO interface of the raspberry pi.

Functionality

The module is currently only able to read the serial number of the tag which is hold onto the reader.

Example

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

About

node.js module to access a rfid reader with rc522 chipset which is connected a raspberry pi via i2c

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 80.8%
  • C 18.7%
  • Other 0.5%