monteslu/bean-io

DEPRECATION! and not working :'(

Opened this issue · 2 comments

Hi, run this script anda return this error.

var five = require("johnny-five"),
beanio = require("bean-io"),
board,
boardIO = new beanio.Board({
// name: "ZAPP" // optional: you can specify a localName otherwise defaults to nearby bean
});

board = new five.Board({
io: boardIO
});

board.on("ready", function() {
console.log("Placa lista.");

var led = new five.Led({pin: 13});
led.blink();
});
console.log("\nEsperando a que inicialice el dispositivo...");

Error:
DEPRECATION: Please use require('serialport') instead of require('serialport').SerialPort

devth commented

I hit the same issue.

The error is at line 146 in node_modules/bean-io/node_modules/ble-bean/lib/Bean.js
Change "new Buffer({})" to "new Buffer([])" and it will work