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