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