npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-f3-card-dispenser

v0.0.1

Published

This is a project NodeJS/C++ addon for control the reader and card dispenser: RFID/IC Card Dispenser: Motorized, F3 provide by Lintechtt.

Downloads

6

Readme

F3 Card dispenser collector with RFID card reader

This module is an addons NodeJS that make a interface with lib of F3 Card Dispenser. If you want have access to lib files and how i build this see github repository of this project.

Features

  • Connect - Open connection to dispenser
  • Disconnect - Close connection
  • Move - Control rfid card flow inside hardware
  • Sensor Status - Check status of 12 available sensors
  • Dipenser Status - Consult if has a card on read, if capture box is full and if card box is low, empty or enough
  • Allow Insert Card - Permit insert card on dispenser, this is an option and is true by default
  • Deny Insert Card - Forbidden insert of card
  • Read RFID Card - Just serial number of card mifare S50, but it is possible to extends for new type of reads if you want but is necessaty develop.
  • Move Straight Out - Move card full out
  • Move To Capture Box - Discard card
  • Move To RF Position - Move to reader RFID
  • Move to IC Position - Move to reader IC
  • Move Out - Move out but not fully
  • Card Box Status - Check if card box is low, empty or enough
  • Capture Box Status - Check if capture box is full
  • Has Card - Check if has a card in any reader position

You can also:

  • Configure to verify in a preset interval the card status, you can pass three callback functions on options, each one of this function are responsable to be called when event ocorrred. See hooks and exemple section to better understand.

Options

  • port - Com port defualt 3
  • baudrate - Default 9600
  • allowInsert - this option allow insert card when a connection is instanced. Default is true
  • intervalTimeout - in milissecond you can configure timeout interval of check of card position (NO_CARD, CART_AT_GATE, CARD_IN_THE_MIDLE), if you enable the action using enableCheckRfid() function
  • handleHasCard - if you enable auto check tou also can pass a function on this options to call when event 'hasCard' ocurred
  • handleHasCardOnGate - the same of 'handleHasCard' but event is 'hasCardOnGate'
  • handleNoCardIn - the same of 'handleHasCard' but event is 'noCardIn'

Github

Open source with a Github repository

Libraries

| Source | Link | | ------ | ------ | | Lintechtt | F3 Card Dispenser |

Installation

Install the dependencies and devDependencies and start the server.

$ npm i node-f3-card-dispenser

Require and instance

On your code, remenber, this instance open a hardware connection, so we need use as a singleton, the follow exemple already send callback functions but it is not a mandatary options.

I recommend you see exemple.js file and index.js, on this files you can check how actions are called, it is very simple. I hope :)

const Dispenser = require('node-f3-card-dispenser');

const handleHasCard = () => {
    //STOP INTERVAL CHECK
    myDispenser.disableCheckRfid();
    //READ CARD VALUE
   readRfid() //CONSULT exemple.js to see how to call this
    // MOVE OUT CARD
    move(1); //CONSULT exemple.js to see how to call this
    // START AGAIN INTERVAL CHECK
    myDispenser.enableCheckRfid();
}

const handleHasCardOnGate = () => {
    console.log("Has a card on the gate, please get your card!")
}

const handleNoCardIn = () => {
    console.log("There is no card in!")
}

// INSTANCE OF DISPENSER
const myDispenser = new Dispenser({ port: 3, baudrate: 9600, allowInsert: true, intervalTimeout: 1000, handleHasCard, handleHasCardOnGate, handleNoCardIn });

Building

| Dependecy | | ------ | | nodeJS | | node-gyp |

For build to another platforms i recommend clone deafult github repository and run the follow commands

Run on root folder of project:

$ node-gyp configure

$ node-gyp build

After build get file .node on folder /build/Release/ this will be your addon file who you shoud require.

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
  • Add ICC reader
  • Read others block of cards
  • White data in mifare or ICC cards
  • Auto detect type of card

License

MIT