From 70020cfd759d43f27ce5ff9c1f5c96c03016caee Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Wed, 7 Feb 2024 08:53:12 +0000 Subject: [PATCH] setup lib --- app.js | 4 ++++ hpgl.js | 0 2 files changed, 4 insertions(+) create mode 100644 hpgl.js diff --git a/app.js b/app.js index c63f088..52b2285 100644 --- a/app.js +++ b/app.js @@ -3,7 +3,10 @@ const express = require('express') const bodyParser = require('body-parser') const app = express() const movement = 1000; +import hpgl from "./hpgl.js"; + +console.log(hpgl()); // Create a port const port = new SerialPort({ path: '/dev/ttyUSB0', @@ -14,6 +17,7 @@ const port = new SerialPort({ const toPlotter = (message) => { console.log("i will write to plotter ", message); + port.write(message, function (err) { if (err) { return console.log('Error on write: ', err.message) diff --git a/hpgl.js b/hpgl.js new file mode 100644 index 0000000..e69de29