npm

rc_s380_driver
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

RC-S380 Driver for WebUSB

What is this?

Sony RC-S380 (NFC card reader) Driver for WebUSB written in TypeScript.

How to install

$ npm i rc_s380_driver
# or
$ yarn add rc_s380_driver

How to use

import { RCS380, ReceivedPacket } from 'rc_s380_driver'

class Sample {
    constructor(readonly rcs380: RCS380) {}

    public static async connect(): Promise<TypeFTag> {
        const device = await RCS380.connect()
        return new Sample(device)
    }

    public async sendCommand(): Promise<ReceivedPacket> {
        const command = Uint8Array.of(0x00, 0xff, 0xff, 0x01, 0x00)
        return this.rcs380.inCommRf(command, 0.01)
    }
}

npm package

rc-s380-driver

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i rc_s380_driver

Weekly Downloads

26

Version

1.1.2

License

MIT

Unpacked Size

15.2 kB

Total Files

11

Last publish

Collaborators

  • aruneko