bugfixing some typos

This commit is contained in:
Shannon Sterz 2016-01-14 21:48:38 +01:00
parent fac756b226
commit 8b7b84f83a

View file

@ -1,7 +1,7 @@
var events = require('events'),
child = require('child_process'),
util = require('util'),
serial = require("serialport").SerialPort;
serial = require("serialport");
var Arduino = function (baudrate) {
this.baudrate = baudrate && baudrate || 9600;
@ -19,7 +19,7 @@ Arduino.prototype.setup = function () {
buff = buff.slice(0, buff.indexOf('\n'));
console.log('Guessing serial port ... ' + buff);
self.serial = new serial(buff, {
self.serial = new serial.SerialPort(buff, {
baudrate: self.baudrate,
parser: serial.parsers.readline('\n')
}, false);
@ -30,7 +30,7 @@ Arduino.prototype.setup = function () {
return self.success = false;
}
serialPort.write(new Buffer('00000000'));
self.serial.write(new Buffer('00000000'));
});
self.success = true;