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

0.0.8 • Public • Published

serialport-sync Driver For NodeJS

Installation

npm i serialport-sync --save

Usage

var SerialPort = require("serialport-sync");

var serial = new SerialPort.SerialPort("COM4", 115200, false);

main();

async function main() {
    console.log(await SerialPort.SerialPort.GetSerialPorts());

    await serial.Open();

    await serial.WriteLine('f0');

    await serial.Delay(500);

    await serial.WriteLine('f?');

    await serial.Delay(500);


    var res = await serial.ReadExisting();
    console.log(res);
}

Readme

Keywords

none

Package Sidebar

Install

npm i serialport-sync

Weekly Downloads

8

Version

0.0.8

License

ISC

Unpacked Size

42.2 kB

Total Files

8

Last publish

Collaborators

  • ashwalh