Как запустить 2 доски Tessel 2 в node.js
Я создаю систему хронометража гонок с горячим колесом, используя платы Tessel 2, и все шло хорошо, пока у меня не кончились контакты, и мне потребовалось запустить вторую плату Tessel 2. Вот как я инициировал 1 доску, и это хорошо сработало.
const Board = require("johnny-five")
const Tessel = require("tessel-io")
const five = require("johnny-five")
const board = new Board({
io: new Tessel()
});
Теперь я пытаюсь запустить вторую плату, которая подключена к USB-порту первой платы следующим образом.
const five = require("johnny-five");
const Tessel = require("tessel-io");
const boards = new five.Boards({
ports: ["A","B"],
io: new Tessel()
});
Когда я запускаю это, я получаю строку предупреждений о том, что предварительно скомпилированные модули не найдены, а затем вылетает с ошибкой о том, что не удается найти файл привязок. Полный вывод ниже. Я открыл проблему, так как запрошено сообщение об ошибке, но там немного тихо. Я npm'd затронутых модулей, но это не приносит пользы.
curt@HOTH:~/projects/j5ik$ t2 run twoboards.js
INFO Looking for your Tessel...
INFO Connected to 3po.
INFO Building project.
WARN Pre-compiled module is missing: @serialport/bindings@9.2.0.
WARN Please file an issue at https://github.com/tessel/t2-cli/issues/new with this warning.
WARN
WARN This warning might be caused by one of the following:
WARN
WARN 1. A pre-compiled binary has not yet been built for this module.
WARN 2. The binary didn't compile correctly for the platform that you're developing on.
WARN Binaries that are Linux-only or even OpenWRT-specific may cause this issue.
WARN Try to npm install --force the affected module, then rerun your deployment command.
WARN 3. The binary may be platform specific and impossible to compile for OpenWRT.
WARN Pre-compiled module is missing: usb@1.7.1.
WARN Please file an issue at https://github.com/tessel/t2-cli/issues/new with this warning.
WARN
WARN This warning might be caused by one of the following:
WARN
WARN 1. A pre-compiled binary has not yet been built for this module.
WARN 2. The binary didn't compile correctly for the platform that you're developing on.
WARN Binaries that are Linux-only or even OpenWRT-specific may cause this issue.
WARN Try to npm install --force the affected module, then rerun your deployment command.
WARN 3. The binary may be platform specific and impossible to compile for OpenWRT.
WARN Pre-compiled module is missing: node-addon-api@3.0.2.
WARN Please file an issue at https://github.com/tessel/t2-cli/issues/new with this warning.
WARN
WARN This warning might be caused by one of the following:
WARN
WARN 1. A pre-compiled binary has not yet been built for this module.
WARN 2. The binary didn't compile correctly for the platform that you're developing on.
WARN Binaries that are Linux-only or even OpenWRT-specific may cause this issue.
WARN Try to npm install --force the affected module, then rerun your deployment command.
WARN 3. The binary may be platform specific and impossible to compile for OpenWRT.
INFO Writing project to RAM on 3po (1146.368 kB)...
INFO Deployed.
INFO Running twoboards.js...
/tmp/remote-script/node_modules/bindings/bindings.js:135
throw err;
^
Error: Could not locate the bindings file. Tried:
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/build/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/build/Debug/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/out/Debug/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/Debug/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/out/Release/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/Release/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/build/default/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/compiled/8.11.3/linux/mipsel/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/addon-build/release/install-root/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/addon-build/debug/install-root/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/addon-build/default/install-root/bindings.node
→ /tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/lib/binding/node-v57-linux-mipsel/bindings.node
at bindings (/tmp/remote-script/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/lib/linux.js:1:119)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/tmp/remote-script/node_modules/serialport/node_modules/@serialport/bindings/lib/index.js:1:346)
T2 version from both Tessels
INFO Tessel Environment Versions:
INFO t2-cli: 0.1.23
INFO t2-firmware: 0.2.0
INFO Node.js: 8.11.3
Я использую Ubuntu 20.04, а версия node - v16.0.0, хотя я пытался переключиться на более ранние версии, но я даже не могу заставить T2-cli работать, если я это сделаю. Любое руководство будет оценено.