【问题标题】:How to run johnny-five on Ubuntu 15.04?如何在 Ubuntu 15.04 上运行 johnny-5?
【发布时间】:2015-07-14 17:31:15
【问题描述】:
$ node hello.js 
1436894483255 Device(s) /dev/ttyUSB0  
1436894483279 Connected /dev/ttyUSB0  
1436894493287 Device or Firmware Error A timeout occurred while connecting to the Board. 

Please check that you've properly flashed the board with the correct firmware. 

See: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting 
events.js:87
      throw Error('Uncaught, unspecified "error" event.');
            ^
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at Board.emit (events.js:87:13)
    at Board.log (/usr/lib/node_modules/johnny-five/lib/board.js:623:8)
    at Board.(anonymous function) [as error] (/usr/lib/node_modules/johnny-five/lib/board.js:634:14)
    at Board.<anonymous> (/usr/lib/node_modules/johnny-five/lib/board.js:407:12)
    at Timer.listOnTimeout (timers.js:119:15)

我已经在 Ubuntu 上安装了 node 和 johnny-5,并连接了 Arduino Nano。但它抛出了上述错误。

【问题讨论】:

  • 您是否还安装了 Firmata 固件,如错误消息链接到的页面上所述?

标签: javascript node.js ubuntu-15.04 johnny-five


【解决方案1】:

在运行节点应用程序之前,尝试打开 arduino:

$ arduino

转到文件 > 示例 > Firmata,然后选择 StandardFirmata

一旦打开上传到您的arduino。

完成后,您应该能够毫无问题地运行您的节点应用程序

【讨论】:

    【解决方案2】:

    arduino IDE 可能正在保持与电路板的连接。尝试关闭它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-22
      • 1970-01-01
      • 2016-04-05
      • 2016-02-21
      • 2016-04-13
      • 1970-01-01
      • 2015-11-04
      • 2015-11-16
      相关资源
      最近更新 更多