bean-io
bean-io copied to clipboard
DEPRECATION! and not working :'(
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
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