comportc
v1.1.6
Published
Allow you read and write a Serial Port
Downloads
1
Maintainers
Readme
ComPortC
Allow you read and write in a Serial Port.
Installation
Use the package manager npm or yarn to install ComPortC.
yarn add comportc
npm install comportc
Usage
const Serial = require("comportc");
//Open communication
Serial.Open(4, 9600);
//blocks the execution until the data being recept
const readed = Serial.ReadSync();
console.log(readed)
// write the first params in port 4
Serial.Write("hello");
// close comunnication opened before
Serial.Close();
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.