Skip to content

HarelAshwal/serialport-sync

Repository files navigation

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);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published