rs232-tuanzin

1.0.2 • Public • Published

rs232-tuanzin

Supports communication with devices via (COM) port on Windows

Installation

  npm install rs232-tuanzin

Usage/Examples

const { connectSerialPort, ReadDataString } = require('rs232-tuanzin');

async function connectAndReadData() {
    const port = await connectSerialPort({ port: 'COM3',baudRate: 9600 }); // default parity = "", dataBits = 8, stopBits = 1, flowControl = false
    ReadDataString(port, (data) => {
        // Only returns data when there is a change
        console.log(data);
    })
}

// run
connectAndReadData()

Readme

Keywords

Package Sidebar

Install

npm i rs232-tuanzin

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3 kB

Total Files

4

Last publish

Collaborators

  • lnt0908