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

sankyo-ict3k

v1.0.6

Published

Sankyo ICT3K5 library wrapper for Node.js.

Downloads

2

Readme

sankyo-ict3k

Sankyo ICT3K5 library wrapper for Node.js. Should work with their ICT3K5/ICT3K7 card readers. Will work on Windows and only on 32bit Node.js due to library's limitations.

Installation


$ npm install sankyo-ict3k

Methods

.connect(object, callback)

Establishes connection with the card reader. Object containing port, baud rate fields should be passed to the method. Callback (optional) is executed after finishing connection attempt. Result of the operation is passed to the callback as an argument.


	// object example
	{
		port: "COM4",
		baudRate: 115200
	}

.exec(object, callback)

Sends command to the connected device. Accepts object as an argument. Object contains command, parameter and data (optional) fields. Executes callback (optional) after finishing a command and passes result as an argument.


	// object example
	{
    	command: 0x30,
    	parameter: 0x30,
    	data: [0x33, 0x32, 0x34, 0x31, 0x30, 0x30, 0x31, 0x30, 0x30, 0x30]
	}

.disconnect()

Disconnects from the device.

Example usage


const ict3k = require('sankyo-cardreader');
ict3k.connect({port: "COM4", baudRate: 115200}, function(res) { // connect to the device
	console.log(res);
	ict3k.exec({
    	command: 0x30,
    	parameter: 0x30,
    	data: [0x33, 0x32, 0x34, 0x31, 0x30, 0x30, 0x31, 0x30, 0x30, 0x30]	// init connection
	},function(res) {
		console.log(res);
		ict3k.exec({ // set color green
    	    command: 0x35,
    	    parameter: 0x31,
		}, function() {
			ict3k.exec({ // set color red
    		    command: 0x35,
    		    parameter: 0x32,
			}, function(res) {
				console.log(res);
				ict3k.disconnect(); // disconnect device
			});
		});
	});
});

License

This is only a wrapper for Sankyo's publicly distributed ICT3K_6240 library. All rights for the library belong to Sankyo company and other respective owners.