12 lines
192 B
TypeScript
12 lines
192 B
TypeScript
|
import SerialPort from "serialport";
|
||
|
|
||
|
const newPort = () => {
|
||
|
const port = new SerialPort("COM5", {
|
||
|
baudRate: 9600,
|
||
|
autoOpen: false,
|
||
|
});
|
||
|
return port;
|
||
|
};
|
||
|
|
||
|
export default newPort;
|