diff --git a/Software/NodeJS/libs/sensors/base/digitalSensor.js b/Software/NodeJS/libs/sensors/base/digitalSensor.js index f1c7cb8c..9db9551d 100644 --- a/Software/NodeJS/libs/sensors/base/digitalSensor.js +++ b/Software/NodeJS/libs/sensors/base/digitalSensor.js @@ -13,7 +13,7 @@ DigitalSensor.prototype.read = function() { var writeRet = this.board.writeBytes(commands.dRead.concat([this.pin, commands.unused, commands.unused])) if (writeRet) { this.board.wait(100) - return this.board.readByte() + return this.board.readByte()[0] } else { return false } @@ -22,4 +22,4 @@ DigitalSensor.prototype.write = function(value) { return this.board.writeBytes(commands.dWrite.concat([this.pin, value, commands.unused])) } -module.exports = DigitalSensor \ No newline at end of file +module.exports = DigitalSensor