From 894e19dcf11e39fb1d42e5823d3c61210020ba10 Mon Sep 17 00:00:00 2001 From: Stefan Sterz Date: Wed, 13 Jan 2016 23:58:55 +0100 Subject: [PATCH] bug fixes --- nodejs/routes/index.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/nodejs/routes/index.js b/nodejs/routes/index.js index bc08198..5170d5b 100644 --- a/nodejs/routes/index.js +++ b/nodejs/routes/index.js @@ -4,11 +4,13 @@ var sucess = true; var SerialPort = require("serialport").SerialPort serialPort = new SerialPort("/dev/ttyACM0", { baudrate: 9600 -}, false).open(function (error) { - if ( error ) { - sucess = false; - } - }); +}, false); + +serialPort.open(function (error) { + if ( error ) { + sucess = false; + } +}); /* GET home page. */ router.get('/', function(req, res, next) {