node-mt166

1.2.4 • Public • Published

node-mt166

Node.js API to comunicate with Mingte tech MT166 RFID card collector and dispenser using node serialport

Github

Open source with a Github repository

Quick-start

$ npm i node-mt166
 
 
const MT166 = require('node-mt166')
 
//Available options
const options = {
    port: 6, //default
    baudRate: 9600, //default
    callbackConnection: console.log, //default 
    autoDiscovery: false //default
}
 
//Static port
let dispenser = new MT166({port: 6, callbackConnection:(result) => {
    if(result.connected){
        //Your logic
    }
})
 
// Autodicovery Port 
let dispenser = new MT166({autoDiscovery: true, callbackConnection:(result) => {
    if(result.connected){
        //Your logic
    }
})
 
 

Building

Dependecy
serialport

Features

  • Move To Capture Box - Discard card
  • Move To Read Position - Move to reader RFID
  • Move To Dispense Position - Move out but not fully
  • Move To Out Fully - Move out fully
  • Card Box Status - Check if card box is low or empty
  • Check Card Read Position - Check if has a card in reader position
  • Check Card Dispense Position - Check if has a card in reader position

Examples

Check the 'exemple.js' file and uncomment action that you would like to test.

Todos

See file PDF doc on root folder, in there you can see all is possible to do and get better the current implementation

  • Tests
  • Onboard RFID reader
  • Check capture box status
  • Generic string to connect linux port

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i node-mt166

Weekly Downloads

0

Version

1.2.4

License

MIT

Unpacked Size

16 kB

Total Files

5

Last publish

Collaborators

  • leandro_marques