wiegand
A fork of node-wiegand for only 26bits wiegand readers on GPIO.
Tested with EM-18 Reader Module on a Raspberry Pi 3 model B.
installation
$ npm install --save wiegand-rfid-reader#OR $ npm install --save https://github.com/7aman/wiegand-rfid-reader.git
usage
const wiegand = ;const reader = ;const Gpio = Gpio; //export d0, d1 pinsconst d0 = 17 d1 = 18;const wgnd0 = d0 "in" "both";const wgnd1 = d1 "in" "both";reader; reader; reader; process;
api
class: Wiegand
inherits EventEmitter
method: begin([options], [callback])
default options:
// RaspberryPI default d0: 17 d1: 18
callback
will fire on the ready
event or if an error happens during the process. Errors will be emited on the error
event.
method: stop([callback])
stop polling for changes to GPIO. Will callback when done and emit a stop
event.