Hi all
I have created .js file that reads data from a serial port (read_port.js).
read_port.js:
var serialport = require("serialport");
var SerialPort = serialport.SerialPort;
var serialPort = new SerialPort("COM26", {
baudrate: 9600,
parser: serialport.parsers.readline("\n")
});
serialPort.on("open", function () {
console.log('open');
serialPort.on('data', function(data) {
console.log(data);
});
});
I now need to populate a text box with the data from the serial port using the .js file when a button is clicked.
How would one go about doing this?